Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit e5ed68a

Browse files
author
Jaquier Aurélien Tristan
committed
Deprecation of numpy.int and numpy.float
1 parent 7a65b36 commit e5ed68a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bluepyopt/deapext/tools/selIBEA.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _calc_fitness_components(population, kappa):
6363
population_matrix = numpy.fromiter(
6464
iter(-x for individual in population
6565
for x in individual.fitness.wvalues),
66-
dtype=numpy.float)
66+
dtype=numpy.float64)
6767
pop_len = len(population)
6868
feat_len = len(population[0].fitness.wvalues)
6969
population_matrix = population_matrix.reshape((pop_len, feat_len))

bluepyopt/ephys/efeatures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def _filter_response(response, fcut=[0.5, 6000], order=2, filt_type="lfilter"):
563563

564564
trace = response["voltage"]
565565

566-
if isinstance(fcut, (float, int, np.float, np.integer)):
566+
if isinstance(fcut, (float, int, np.floating, np.integer)):
567567
btype = "highpass"
568568
band = fcut / fn
569569
else:

bluepyopt/ephys/extra_features_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def repolarization_slope(waveforms, sampling_frequency, return_idx=False):
299299

300300
rslope = np.empty(waveforms.shape[0])
301301
rslope[:] = np.nan
302-
return_to_base_idx = np.empty(waveforms.shape[0], dtype=np.int)
302+
return_to_base_idx = np.empty(waveforms.shape[0], dtype=np.int_)
303303
return_to_base_idx[:] = 0
304304

305305
time = np.arange(0, waveforms.shape[1]) * (1 / sampling_frequency) # in s

bluepyopt/ipyp/bpopt_tasksdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def plot_duration_histogram(tasks):
9898
durations = np.fromiter((t['duration']
9999
for task_list in tasks.values()
100100
for t in task_list),
101-
dtype=np.float)
101+
dtype=np.float64)
102102
plt.hist(durations, 100)
103103

104104
plt.xlabel('Duration (s)')

0 commit comments

Comments
 (0)