| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
BUG: Use 2GiB chunking code for fwrite() on mingw32/64
|
| | |
| |
| |
| |
| |
| |
| | |
This is a bit too broad because msys UCRT runtime may actually not
need it. Changes the type in the loop to `size_t`. This is not necessary
but the current constants are buggy without it if the branch is accidentally
used on 32bit.
|
| | |
| |
| |
| | |
Addresses #2256
|
| |\ \
| | |
| | | |
BUG: Fix weak scalar logic for large ints in ufuncs
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This fixes it, breaks warnings (partially), but most or all of
those paths should be errors anyway.
|
| |\ \ \
| | | |
| | | | |
ENH: Restore TypeError cleanup in array function dispatching
|
| | | | |
| | | |
| | | |
| | | | |
Not that it mattered, but docs say direction should be either -1 or 1
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When the dispathcer raises a TypeError and it starts with the dispatchers
name (or actually __qualname__ not that it normally matters), then it is
nicer for users if we just raise a new error with the public symbol name.
Python does not seem to normalize exception and goes down the unicode path,
but I assume that e.g. PyPy may not do that. And there might be other
weirder reason why we go down the full path. I have manually tested it
by forcing Normalization.
Closes gh-23029
|
| | | | | |
|
| |\ \ \ \
| |_|/ /
|/| | | |
MAINT: do not use copyswapn in array sorting internals
|
| | | | | |
|
| |\ \ \ \
| |/ / /
|/| | | |
ENH: add fast path for str(scalar_int)
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| |/ / /
|/| | | |
MAINT: Add a proper implementation for structured zerofill
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reorganizes the generic traversal functions for structured
dtypes a bit (before it wasn't quite generic).
Then uses that for zerofilling. We could get the two a bit closer
by also supporting `func==NULL` explicitly for clearing.
(I have not includes this here.)
The old `FillObjectArray` is still in use now, this is not ideal
and the new approach should be duplicated to add an "emptyfill"
(same semantics, normally just memset to 0, but for objects we
place an explicit `None` object).
This is a necessary follow-up to gh-23591.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | | |
ENH: Adding Object dtype to einsum
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Implementing Erics suggestions
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| | | | | | |
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
DEP,BUG: Finalize subarray dtype FutureWarning and fix its assignment
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This unfortunately switches over the C-only path when FromArray
is called with a subarray dtype.
Together with the previous commit (which is very simple but in a sense
does the heavy lifting):
Closes gh-23083
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In some cases we know that we want to use the *exact* dtype that we already
have (mainly when taking views). This is also useful internally because there
are very rare code-paths were we even create temporary arrays that contain
subarray dtypes.
|
| |\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
API: Add DType classes into new `numpy.dtypes` module
|
| | | | | | |
| | | | | |
| | | | | | |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | |_|_|/ /
|/| | | |
| | | | |
| | | | |
| | | | | |
This was always just a stop-gap for shapely basically, so there is
no harm finalizing things.
|
| | |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This PR reflects some of the progress achieved in issue #10404 and is used to asses the impact of the changes.
With the changes in this PR, `float(numpy.array([1.0])` now gives a warning; likewise some other things:
```python
import numpy
a = numpy.random.rand(10, 1)
a[0] = numpy.array([1.0]) # okay
a[0] = numpy.array(1.0) # okay
a[0] = 1.0 # okay
b = numpy.random.rand(10)
b[0] = numpy.array([1.0]) # ValueError: setting an array element with a sequence.
b[0, ...] = numpy.array([1.0]) # okay
b[0] = numpy.array(1.0) # okay
b[0] = 1.0 # okay
```
This aligns the behavior of numpy arrays with that of lists:
```python
float([3.14])
```
```
TypeError: float() argument must be a string or a number, not 'list'
```
```python
import numpy as np
a = np.random.rand(5)
a[0] = [3.14]
```
```
ValueError: setting an array element with a sequence.
```
Fixes #10404.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | | |
MAINT: improve error when a dtype doesn't support the buffer interface
|