[Numpy-discussion] 2020 NumPy survey results

2021-06-22 Thread Inessa Pawson
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
official NumPy community survey. Over 1,200 users from 75 countries
participated to help us map out a landscape of the NumPy community and
voiced their thoughts about the future of the project.

We are finally ready to share with you the findings of this survey. You can
read the full report here: https://numpy.org/user-survey-2020.

The inaugural NumPy community survey was an effort of an international
group of volunteers who showed a remarkable dedication to the project
amidst the extraordinary challenges of the year 2020. Each is listed
alphabetically by type of contribution.

*Survey Design and Analysis*
Ross Barnowski
Sebastian Berg
Xiaoyi Deng
Ralf Gommers
Stephanie Mendoza
Inessa Pawson
Deji Suolang
Mame Fatou Thiam

*Translations*
Eric Depagne
Xiaoyi Deng
Yuki Dunn
Kiko Correoso Garcia
Jose Guzman
Andrei Ivanov
Paul Ivanov
Siddhartha Kapoor
Tetsuo Koyama
Guilherme Leobas
Dayane Machado
Mahfuza Humayra Mohona
Aerik Pawson
Inessa Pawson
Zijie Poh
Sumera Priyadarsini
Fabrice Silva
Shaloo Shalini
Kriti Singh
Alexandre de Siqueira

*Special thanks*
Frederick Conrad (Survey Research Center, Institute for Social Research,
University of Michigan)
Danuta Dzierżanowska
Jim Lepkowski (Survey Research Center, Institute for Social Research,
University of Michigan)
Claire McKay Bowen (Urban Institute)
Michael Traugott (Survey Research Center, Institute for Social Research,
University of Michigan)

Also, a huge thank you to everyone who took part in this survey. We
couldn’t do it without your support.

Inessa Pawson
NumPy Survey Team
___
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-22 Thread bas van beek
> Stefan, that sketch is more complicated than it needs to be - `np.copy` is a 
> python function, so you can just attach the attributes directly! (although 
> maybe there are implications for static typing)

For the type annotations we can simply use something akin to Stéfans proposed 
`NpCopy` class;
probably in combination with `Protocol`.
It's a bit more work compared to annotating a normal python function, but it's 
quite easy nevertheless.

Regards, Bas

From: NumPy-Discussion 
 on behalf of Eric 
Wieser 
Sent: 21 June 2021 18:56
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] copy="never" discussion and no deprecation 
cycle?

Stefan, that sketch is more complicated than it needs to be - `np.copy` is a 
python function, so you can just attach the attributes directly! (although 
maybe there are implications for static typing)
```
class CopyFlag(enum.Enum):
IF_NEEDED = 0
ALWAYS = 1
NEVER = 2

np.copy.IF_NEEDED = CopyFlag.IF_NEEDED
np.copy.ALWAYS = CopyFlag.ALWAYS
np.copy.NEVER = CopyFlag.NEVER
```
It would also work nicely for the `True/False/other` version that was proposed 
in the much older PR as `np.never_copy`:
```
class _CopyNever:
def __bool__(self): raise ValueError

np.copy.NEVER = _CopyNever()
```

All of these versions (and using the enum directly) seem fine to me.
If we go down the enum route route, we probably want to add "new-style" 
versions of `np.CLIP` and friends that are true enums / live within a more 
obvious namespace.

Eric

On Mon, 21 Jun 2021 at 17:24, Stefan van der Walt 
mailto:stef...@berkeley.edu>> wrote:
On Sun, Jun 20, 2021, at 20:46, Gagandeep Singh wrote:
> I have recently joined the mailing list and have gone through the previous 
> discussions on this thread. I would like to share my analysis (advantages and 
> disadvantages) of three possible alternatives (Enum, String, boolean) to 
> support the proposed feature.

Thanks for this thorough analysis, Gagandeep!

I'll throw one more heretical idea out there:

`np.copy.IF_NEEDED`, `np.copy.ALWAYS`, `np.copy.NEVER`.

This has the advantages of the enum, doesn't pollute the global namespace, and 
has an intuitive name.

`np.array(x, copy=np.copy.ALWAYS)`

It would be slightly more awkward to type, but is doable.  A rough Python 
version sketch would be:

class CopyFlag(enum.Enum):
IF_NEEDED = 0
ALWAYS = 1
NEVER = 2

class NpCopy:
IF_NEEDED : CopyFlag = CopyFlag.IF_NEEDED
ALWAYS : CopyFlag = CopyFlag.ALWAYS
NEVER : CopyFlag = CopyFlag.NEVER

def __call__(self, x):
return ...whatever copy returns...

np.copy = NpCopy()


Stéfan
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] NumPy Community Meeting Wednesday

2021-06-22 Thread Sebastian Berg
Hi all,

There will be a NumPy Community meeting Wednesday June 23rd at
20:00 UTC. Everyone is invited and encouraged to
join in and edit the work-in-progress meeting topics and notes at:

https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both

Best wishes

Sebastian


___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion