cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
63 stars 267 forks source link

Changed some numpy calls following the numpy 2.0 migration guide #2406

Closed Tobychev closed 10 months ago

Tobychev commented 11 months ago

I grepped ctapipe for calls to the functions mentioned in the the numpy 2.0 migration guide, and changed the few instances I found according to the reccomendations in the guide. This closes #2404.

For completness, these are the functions listed in the guide:

np.in1d
np.row_stack
np.trapz
np.add_docstring
np.add_newdoc
np.add_newdoc_ufunc
np.asfarray
np.byte_bounds
np.cast
np.cfloat
np.clongfloat
np.compat
np.complex_
np.DataSource
np.deprecate
np.deprecate_with_doc
np.disp
np.fastCopyAndTranspose
np.find_common_type
np.get_array_wrap
np.float_
np.geterrobj
np.Inf
np.Infinity
np.infty
np.issctype
np.issubclass_
np.issubsctype
np.mat
np.maximum_sctype
np.NaN
np.nbytes
np.NINF
np.NZERO
np.longcomplex
np.longfloat
np.lookfor
np.obj2sctype
np.PINF
np.PZERO
np.recfromcsv
np.recfromtxt
np.round_
np.safe_eval
np.sctype2char
np.sctypes
np.seterrobj
np.set_numeric_ops
np.set_string_function
np.singlecomplex
np.string_
np.source
np.tracemalloc_domain
np.unicode_
np.who