On 16/6/21 11:00 pm, Sebastian Berg wrote:

Hi all,

(sorry for the length, details/discussion below)

On the triage call, there seemed a preference to just try to skip the
deprecation and introduce `copy="never"`, `copy="if_needed"`, and
`copy="always"` (i.e. string options for the `copy` keyword argument).


Why this may be controversial: today someone could be calling |'||np.array(..., copy="never")', which would call| '|bool("never")', which would evaluate to 1, and would end up| doing the exact opposite of never. So their code is wrong, and they do not know it but are used to the error. If we change this, it would silently fix their code to do what they intended.


Is that a correct reading of the problem?

If so, I am in favor of the proposal to use string options in addition to boolean options.


Matti

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

Reply via email to