MAINT: fixes for numpy>=2
Compare changes
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
Numpy is preparing to release version 2 which makes a number of backwards incompatible changes. This MR fixes the small number of issues we had following the migration guide.
(o4-pe-review) [colm.talbot@ldas-pcdev2:~/modules/o4-pe-review/bilby] [master $=] [Mon May 13, 08:23:14]
$ ruff bilby --select NPY201
warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.
bilby/core/utils/io.py:267:27: NPY201 [*] `np.float_` will be removed in NumPy 2.0. Use `numpy.float64` instead.
bilby/core/utils/io.py:269:27: NPY201 [*] `np.complex_` will be removed in NumPy 2.0. Use `numpy.complex128` instead.
bilby/gw/prior.py:1439:22: NPY201 [*] `np.row_stack` will be removed in NumPy 2.0. Use `numpy.vstack` instead.
Found 3 errors.
[*] 3 fixable with the `--fix` option.
(o4-pe-review) [colm.talbot@ldas-pcdev2:~/modules/o4-pe-review/bilby] [master $=] [Mon May 13, 08:23:27]
$ ruff bilby --select NPY201 --fix
warning: `ruff <path>` is deprecated. Use `ruff check <path>` instead.
Found 3 errors (3 fixed, 0 remaining).