Skip to content

Commit

Permalink
small changes to the binning function
Browse files Browse the repository at this point in the history
  • Loading branch information
bouromain committed Nov 9, 2023
1 parent 4c711f6 commit 3edfdac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hippocampy/binning.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ def psth(
# to be sure we have floats here, this can create problems with nan later
mat = np.array(mat, dtype=float, ndmin=2)
events_idx = float_to_int(events_idx)
n_bins_aft = float_to_int(n_bins_aft)
n_bins_bef = float_to_int(n_bins_bef)

# initialise values
sz = mat.shape
Expand All @@ -340,7 +342,7 @@ def psth(
mode="constant",
constant_values=np.nan,
)
else:
elif temp_mat.ndim == 2:
npad = [[0, 0], [0, 0]]
npad[axis] = [pad_before, pad_after]
temp_mat = np.pad(
Expand Down

0 comments on commit 3edfdac

Please sign in to comment.