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
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
> 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.
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
Thanks Chuck!
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion
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
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,
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
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
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
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
11 matches
Mail list logo