| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]})
Out[1]: dtype({'names':['a'], 'formats':['<i8'], 'offsets':[2], 'itemsize':10})
```
After:
```
In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]})
Out[1]: dtype({'names': ['a'], 'formats': ['<i8'], 'offsets': [2], 'itemsize': 10})
```
* Allow switching back to old dtype printing format.
* Add changelog.
|
|\
| |
| | |
MAINT: Override the modules of `np.char` and `np.rec` functions
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| | |
DEP: Formally deprecate `np.typeDict`
|
| | |
|
|\ \
| | |
| | | |
MAINT: OrderedDict is no longer necessary from Python 3.7
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* `fromarrays`
* `fromrecords`
* `fromstring`
* `fromfile`
* `array`
|
|/
|
|
|
|
|
|
|
| |
Via prototype docstring autoreformatter; and cherry-picked to mostly
include spacing issues around colons in parameters and see also.
When no space is present numpydoc tend to miss-parse those sections
A couple of typos are fixed as well.
|
| |
|
| |
|
|
|
|
|
| |
* ENH: Add file like support to np.core.records.fromfile (#2504)
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|
|
|
|
|
| |
Add complete docstring with parameters and examples to
numpy.core.records.array (gh-15853).
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|
|
|
|
|
| |
* ENH: Chain extensions in numpy and numpy/core
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Zuhair Ali-Khan <54608785+zalikh2@users.noreply.github.com>
|
|
|
|
|
|
|
| |
This docstring needs to be a raw string so the backslashes
in the example are not processed by Python or Sphinx.
Closes gh-16390.
|
|
|
|
|
|
| |
Add documentation and examples to fromstring function
See #15853
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
|
|
|
| |
Addresses parts of #15853 by adding full function documentions with parameters to
`numpy/core/records.py`.
Co-authored-by: Dustan Levenstein <dlevenstein@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|
|
|
|
|
| |
There's no need for this attribute to exist any more, it's already exposes publically via `.dtype`.
Also removes the one use of `._names`, which is equivalent to `.dtype.names`.
|
|
|
|
|
| |
types (#15816)
Cleanup from the dropping of python 2
|
|
|
|
|
|
|
|
|
| |
* remove parentheses in the if statements
* use tuples instead of lists in if conditions
* use tuples instead of chained OR conditions
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |
|
|\
| |
| | |
DEP: records: Deprecate treating shape=0 as shape=None
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`shape=n` is a shorthand for `shape=(n,)` except in the case when `n==0`, when it is a shorthand for `shape=None`.
This special case is dangerous, as it makes `fromrecords(..., shape=len(a))` behave surprisingly when a is an empty sequence.
Users impacted by this warning either:
* Have a bug in their code, and will need to either:
- wait for the deprecation to expire
- change their code to use `(len(a),)` instead of `len(a)`
* Are using the non-preferred spellling, and will need to replace a literal `0` or `False` with `None`
|
| |
| |
| |
| |
| |
| |
| | |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|/
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
| |
For some reason this code reconstructed brand new exception objects with no traceback, rather than just re-raising
|
|\ |
|
| | |
|
| |
| |
| |
| | |
wrong
|
| |
| |
| |
| | |
Previously fromarrays would fail when trying to construct a nested structured array.
Fixed by using the dtype object directly, rather than round-tripping it through a string.
|
| |\
| | |
| | | |
BUG: Check dtype and formats arguments for None in numpy.core.records.fromfile
|
| | | |
|
| | |
| | |
| | |
| | | |
numpy.core.records.fromfile
|
| |/
| |
| | |
* ENH: improve performance of numpy.core.records.fromarrays and add benchmarks
|
| |
| |
| | |
Let's not add to the namespace
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* ported the refguide_check module from SciPy for usage
in NumPy docstring execution/ verification; added the
refguide_check run to Azure Mac OS CI
* adjusted NumPy docstrings such that refguide_check passes
|
| |
| |
| |
| | |
Previously attempting to access a field of such an array (such as when printing it!) would result in `ValueError: Changing the dtype of a 0d array is only supported if the itemsize is unchanged`.
|
|/
|
|
|
|
| |
This replaces some more uses of `bool(dt.fields)` and `bool(dt.names)` with `dt.names is not None`.
`dt.fields is not None` would have worked too, but checking `.names` is more prevalent elsewhere
|
|
|
|
| |
Seems this old style division was missed when going to Python3
compatibility.
|
|
|
| |
Use 64-bit integer accumulator for calculating the product of array shapes on 64-bit systems. Fixes #12442.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use list comprehension
* More list comprehension migration
* Revert key copying in dict
* A few more fixes
* More reverts
* Use dict comprehension
* Fix dict comprehension
* Address review comments
* More review comments
* Fix for empty unpacking of zip(*
* Revert zip(* unpacking altogether
* Fix dict copying
* More simplifications
|