Numpy_arraysetops_EP icon indicating copy to clipboard operation
Numpy_arraysetops_EP copied to clipboard

Fix numpy deprecations

Open Korijn opened this issue 3 years ago • 2 comments

Fixes this warning for int, bool and float types for numpy >=1.20:

DeprecationWarning: `np.int` is a deprecated alias for
the builtin `int`. To silence this warning, use `int` by itself.
Doing this will not modify any behavior and is safe. When
replacing `np.int`, you may wish to use e.g. `np.int64` or
`np.int32` to specify the precision. If you wish to review
your current use, check the release note link for
additional information.

Korijn avatar Jan 10 '22 16:01 Korijn

Has this been merged? It would be nice to get rid of the warnings.

alvitawa avatar May 04 '22 11:05 alvitawa

Looks like Eelco approved of the PR but I don't seem to be a contributor on this repo, so I can't merge it :) Eelco has to do that!

Korijn avatar May 04 '22 11:05 Korijn

The deprecation has now expired as of the currently released numpy 1.24 https://github.com/numpy/numpy/pull/22607 and the aliases removed. Thus numpy_indexed is no longer compatible with the current numpy. It would be rather helpful if this patch could be merged and a new release tagged please?

mp15 avatar Jan 20 '23 15:01 mp15

Apologies for the negligence!

EelcoHoogendoorn avatar Jan 21 '23 06:01 EelcoHoogendoorn

Thanks for bringing this to my attention; indeed losing compatibility with future numpy versions requires action.

Just got a new baby though and I havnt done a release of this repo in ages; not sure I can promise it will be dealt with promptly.

As the name of this repo attests I was kinda expecting core numpy to have absorbed functionality like this by now; but no signs of that yet. At the time I was happy to make it into a seperate package since packaging tools for python had matured a lot by then; having to dive back into it after a few years does make me appreciate the monolithic library a lot again though..

EelcoHoogendoorn avatar Jan 21 '23 09:01 EelcoHoogendoorn

Congrats on the baby!

I can take care of packaging (and renaming the repo) for you, if you like!

Korijn avatar Jan 21 '23 10:01 Korijn

Thanks!

Not sure the renaming is a net benefit? Its linked in a lot of stackoverflow answers, for instance; or could the old references be forwarded with a rename?

I see you have access to the pypi listing; do you have access to the conda-forge recipe as well?

EelcoHoogendoorn avatar Jan 21 '23 12:01 EelcoHoogendoorn

Any updates on the @Korijn ? Did you have a chance to look at it, and are there any obstacles if so?

EelcoHoogendoorn avatar Feb 07 '23 13:02 EelcoHoogendoorn

Any updates on the @Korijn ? Did you have a chance to look at it, and are there any obstacles if so?

I'll take care of it, I just returned from a 2 week roadtrip to Sweden :) give me a little more time!

Korijn avatar Feb 07 '23 17:02 Korijn

I decided to dive back into the python packaging ecosystem, which I havnt touched in many years... and I suppose it does not look too bad?

It seems like the workflow as set up a few years ago is still functional with todays tooling and package versions. All that really needs to be done here after merging this branch is to bump the minor version, run python setup.py bdist_wheel, and upload that to pypi? Thought id check with you @Korijn since it seems you set it up in this manner and I know it can be tricky not to get things in a jumbled state unintentionally.

EelcoHoogendoorn avatar Feb 28 '23 08:02 EelcoHoogendoorn

That's correct!

Long story short: the day I posted that comment, I got the flu, and then I ended up breaking a rib through coughing, so I'm still not back to work 100%... glad to see you figured it out yourself.

Korijn avatar Feb 28 '23 09:02 Korijn