Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/fasttext_module/fasttext/FastText.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def score_vs_true(self, label):
else:
y_scores, y_true = ([], ())

return np.array(y_scores, copy=False), np.array(y_true, copy=False)
return np.asarray(y_scores), np.asarray(y_true)

def precision_recall_curve(self, label=None):
"""Return precision/recall curve"""
Expand All @@ -53,7 +53,7 @@ def precision_recall_curve(self, label=None):
else:
precision, recall = ([], ())

return np.array(precision, copy=False), np.array(recall, copy=False)
return np.asarray(precision), np.asarray(recall)

def precision_at_recall(self, recall, label=None):
"""Return precision for a given recall"""
Expand Down Expand Up @@ -236,7 +236,7 @@ def check(entry):
else:
probs, labels = ([], ())

return labels, np.array(probs, copy=False)
return labels, np.asarray(probs)

def get_input_matrix(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import platform
import io

__version__ = "0.9.4"
__version__ = "0.9.5"
FASTTEXT_SRC = "src"

# Based on https://github.com/pybind/python_example
Expand Down