Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jajcayn committed Jul 13, 2023
1 parent b66a4ad commit 7f8ff4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion neurolib/utils/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def resample_func(x):

resampled = resample_func(self.data.values)
# construct new times
new_times = (np.arange(resampled.shape[-1], dtype=np.float) / to_frequency) + self.data.time.values[0]
new_times = (np.arange(resampled.shape[-1], dtype=float) / to_frequency) + self.data.time.values[0]
# to dataframe
resampled = xr.DataArray(resampled, dims=self.data.dims, coords={**self.coords_not_time, "time": new_times})
add_steps = [f"resample to {to_frequency}Hz"]
Expand Down
2 changes: 1 addition & 1 deletion tests/multimodel/base/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_sanitize_matrix_int(self):
mat = (np.random.rand(2, 2) * 100.0).astype(int)
result = _sanitize_matrix(mat, (2, 2))
self.assertTrue(result.dtype.kind == "f")
np.testing.assert_equal(mat.astype(np.float), result)
np.testing.assert_equal(mat.astype(float), result)

def test_sanitize_matrix_float(self):
mat = np.random.rand(2, 2)
Expand Down

0 comments on commit 7f8ff4e

Please sign in to comment.