Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace numpy.bool with bool #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion convoys/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def fit(self, G, B, T):
G = numpy.array(G, dtype=numpy.int)
n, = G.shape
self._n_groups = max(G) + 1
X = numpy.zeros((n, self._n_groups), dtype=numpy.bool)
X = numpy.zeros((n, self._n_groups), dtype=bool)
for i, group in enumerate(G):
X[i,group] = 1
self.base_model.fit(X, B, T)
Expand Down
2 changes: 1 addition & 1 deletion convoys/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def rvs(self, x, n_curves=1, n_samples=1, T=None):
T = numpy.zeros((n_curves, n_samples))
else:
assert T.shape == (n_curves, n_samples)
B = numpy.zeros((n_curves, n_samples), dtype=numpy.bool)
B = numpy.zeros((n_curves, n_samples), dtype=bool)
C = numpy.zeros((n_curves, n_samples))
params = self.params['samples']
for i, j in enumerate(numpy.random.randint(len(params['k']),
Expand Down
2 changes: 1 addition & 1 deletion test_convoys.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def test_convert_dataframe_created_at_nan(n=1000):
df.loc[df.index[0], 'created'] = None
unit, groups, (G, B, T) = convoys.utils.get_arrays(df)
assert numpy.issubdtype(G.dtype, numpy.integer)
assert numpy.issubdtype(B.dtype, numpy.bool_)
assert numpy.issubdtype(B.dtype, bool)
assert numpy.issubdtype(T.dtype, numpy.number)


Expand Down