Skip to content
Open
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
8 changes: 5 additions & 3 deletions libact/base/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ class Dataset(object):
"""

def __init__(self, X=None, y=None):
if X is None: X = np.array([])
if X is None:
X = np.array([])
elif not isinstance(X, sp.csr_matrix):
X = np.array(X)

if y is None: y = []
y = np.array(y)
if y is None:
y = []
y = np.array(y, dtype=object)

self._X = X
self._y = y
Expand Down
2 changes: 1 addition & 1 deletion libact/query_strategies/_hintsvm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
cimport numpy as np
from libc.stdlib cimport free
cimport _hintsvm
from . cimport _hintsvm

cdef extern from *:
ctypedef struct svm_parameter:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools
setuptools<60.0
numpy
scipy
scikit-learn>=0.24
Expand Down