I share Ralf’s general sentiment here; the abundance of overloads makes it in
my opinion undesirable to move to inline annotations due the sheer amount of
extra clutter.
This is in part due to dtype-typing support, which is currently difficult to
express without overloads, though I do expect th
Hi Jelle,
I’ve stumbled upon buffer-related issues multiple times when typing with numpy,
be It either with annotating functions such as `np.frombuffer` or when passing
a numpy array to the likes of `memoryview` (resulting in a false positive by
type checkers).
All in all I’d say this buffer-ty
l of the
headache here, but the numbers-based ABCs are downright useless for static
typing in their current state.
*
Regards,
Bas van Beek
From: Vincent Schut
Sent: 18 January 2022 12:39
To: numpy-discussion@python.org
Subject: [Numpy-discussion] Re: nda
suspicious.
For reference:
```
finfo_obj = np.finfo(np.float64)
reveal_type(finfo_obj.tiny) # Revealed type is
"numpy.floating*[numpy.typing._64Bit*]"
reveal_type(finfo_obj.foo) # "finfo[floating[_64Bit]]" has no attribute "foo"
```
Regards,
Bas van Beek
__
Thanks for the heads up Stefan,
I don't have time right now, but I'll definitely take a look at the recording
later.
From: Stefan van der Walt
Sent: 16 November 2021 20:10
To: Discussion of Numerical Python
Subject: [Numpy-discussion] Tensor typing meeting (15 No
Hi all,
The subject of `MachAr` recently came up in
https://github.com/numpy/numpy/pull/20132 and
an earlier community meeting, more notably: it’s questionably role as public
(and even private?) API.
Ever since the introduction of hard-coded `finfo` parameters back in
numpy/numpy#8504 there ha
> Is this Spam?
Very much so, I'm afraid.
There's been a bit of a spam problem as of late.
Regards, Bas
From: A.S. Khangura
Sent: 21 October 2021 10:24
To: Discussion of Numerical Python
Subject: [Numpy-discussion] Re: Percentile/Quantile "interpolation" refacto
> 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` cl
NEP 29 says December 2021, so that'd be kind of borderline. It
would allow us to use positional-only parameters, which would be quite useful.
There is currently also a substantial amount of version checks in
`numpy.typing` that we could get rid of with python >= 3.8.
+1
Regards,
instead)
For those interested, a PR implementing their deprecation is currently up at
https://github.com/numpy/numpy/pull/19031
Regards,
Bas van Beek
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo
Hi Matthew and Pradeep,
Do you know if the typing summit will be recorded and if these will be made
available later?
While I’d love to attend the live event, this is unfortunately not possible due
to other obligations that day.
Regards, Bas
From: NumPy-Discussion
On Behalf Of
Matthew Rahtz
After a taking a closer look at the `np.choose` docs I think we should change
`choices: npt.ArrayLike` into `choices: Sequence[npt.ArrayLike]`.
This would resolve the issue, but it’d also mean that directly passing an array
will be prohibited (as far as type checkers are concerned).
The docs do
r the other.
Are there any further thoughts on this subject?
Regards,
Bas van Beek
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion
13 matches
Mail list logo