Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Gagandeep Singh
To me, adding enums as attributes of the `np.copy` function seems like a pretty good idea. This trick might resolve the only relatively important issue with Enums. Then, the benefits of Enum might outweigh the disadvantage of uncommon of usage of Enums in NumPy APIs. As an end user, I would like En

Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Benjamin Root
Why not both? The definition of the enum might live in a proper namespace location, but I see no reason why `np.copy.IF_NEEDED = np.flags.CopyFlgs.IF_NEEDED` can't be done (I mean, adding the enum members as attributes to the `np.copy()` function). Seems perfectly reasonable to me, and reads pretty

Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Benjamin Root
> One reason was that Sebastian didn't like people doing `x.shape = ...`. > Users do that, presumably, to trigger an error if a copy needs to be made. Users do that because it is 1) easier than every other option, and 2) I am pretty sure we were encouraged to do it this way for the past 10 years.

Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Stefan van der Walt
On Wed, Jun 23, 2021, at 18:01, Juan Nunez-Iglesias wrote: > Personally I was a fan of the Enum approach. People dislike it because > it is not “Pythonic”, but imho that is an accident of history because > Enums only appeared (iirc) in Python 3.4. In fact, they are the right > data structure for

Re: [Numpy-discussion] NumPy 1.21.0 release

2021-06-23 Thread Tyler Reddy
Thanks Chuck! ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Juan Nunez-Iglesias
Personally I was a fan of the Enum approach. People dislike it because it is not “Pythonic”, but imho that is an accident of history because Enums only appeared (iirc) in Python 3.4. In fact, they are the right data structure for this particular problem, so for my money we should *make it* Pytho

[Numpy-discussion] NumPy 1.21.0 release

2021-06-23 Thread Charles R Harris
Hi All, On behalf of the NumPy team I am pleased to announce the release of NumPy 1.21.0. The highlights are - continued SIMD work covering more functions and platforms, - initial work on the new dtype infrastructure and casting, - universal2 wheels for Python 3.8 and Python 3.9 on Mac,

Re: [Numpy-discussion] copy="never" discussion and no deprecation cycle?

2021-06-23 Thread Stefan van der Walt
Perhaps it is also worth going back to explore our original motivation for making this change. One reason was that Sebastian didn't like people doing `x.shape = ...`. Users do that, presumably, to trigger an error if a copy needs to be made. However, we can catch that already: x = np.reshape

Re: [Numpy-discussion] 2020 NumPy survey results

2021-06-23 Thread Melissa Mendonça
Huge thanks to Inessa and the entire survey team for their work on this! There is a lot of good information to guide possible future actions... :) Best, - Melissa On Wed, Jun 23, 2021 at 1:37 PM Charles R Harris wrote: > > > On Tue, Jun 22, 2021 at 3:41 PM Inessa Pawson wrote: > >> Hi, every

Re: [Numpy-discussion] 2020 NumPy survey results

2021-06-23 Thread Charles R Harris
On Tue, Jun 22, 2021 at 3:41 PM Inessa Pawson wrote: > Hi, everyone! > In 2020, the NumPy survey team in partnership with students and faculty > from a Master’s course in Survey Methodology jointly hosted by the > University of Michigan and the University of Maryland conducted the first > officia

Re: [Numpy-discussion] 2020 NumPy survey results

2021-06-23 Thread Ralf Gommers
On Tue, Jun 22, 2021 at 11:41 PM Inessa Pawson wrote: > Hi, everyone! > In 2020, the NumPy survey team in partnership with students and faculty > from a Master’s course in Survey Methodology jointly hosted by the > University of Michigan and the University of Maryland conducted the first > offici