Skip to content

Commit

Permalink
upgrade for new numpy version
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Dec 13, 2024
1 parent 06e466d commit 5994ca6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pycbc/waveform/decompress_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ def inline_linear_interp(amp, phase, sample_frequencies, output,

rprec = real_same_precision_as(output)
cprec = complex_same_precision_as(output)
sample_frequencies = numpy.array(sample_frequencies, copy=False,
dtype=rprec)
amp = numpy.array(amp, copy=False, dtype=rprec)
phase = numpy.array(phase, copy=False, dtype=rprec)
sample_frequencies = numpy.asarray(
sample_frequencies,
dtype=rprec
)
amp = numpy.asarray(amp, dtype=rprec)
phase = numpy.asarray(phase, dtype=rprec)
sflen = len(sample_frequencies)
h = numpy.array(output.data, copy=False, dtype=cprec)
h = numpy.asarray(output.data, dtype=cprec)
hlen = len(output)
delta_f = float(df)
if output.precision == 'single':
Expand Down

0 comments on commit 5994ca6

Please sign in to comment.