| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Hopefully fix the docstrings of percentile, nanpercentile,
quantile, and nanquantile so that CircleCI passes.
|
| |
|
|
|
|
|
|
|
|
| |
- Added the missing linear interpolation methods.
- Updated the existing unit tests.
- Added pytest.mark.xfail for boolean arrays
See
- https://github.com/numpy/numpy/pull/19857#issuecomment-919258693
- https://github.com/numpy/numpy/issues/19154
|
| |
|
|
|
|
| |
This makes the test more precise, and I ran into having to broaden
the xfails otherwise, because right now reduce-likes incorrectly
faile to give floating point warnings (and I was fixing that).
|
| |
|
|
| |
Use the same approach as in numpy/numpy#9013
|
| |
|
|
| |
https://github.com/numpy/numpy/blob/410a89ef04a2d3c50dd2dba2ad403c872c3745ac/numpy/core/_methods.py#L265-L270
|
| | |
|
| |
|
|
| |
types
|
| |
|
|
| |
arrays
|
| |\
| |
| | |
MAINT: revise OSError aliases (IOError, EnvironmentError)
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
MAINT: refactor "for ... in range(len(" statements
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| | |
MAINT: Use a contextmanager to ensure loadtxt closes the input file.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This seems easier to track that a giant try... finally.
Also move the `fencoding` initialization to within the contextmanager,
in the rather unlikely case an exception occurs during the call to
`getpreferredencoding`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
As of Py3, np.compat.unicode == str, but that's not entirely obvious
(it could correspond to some numpy dtype too), so just use plain str.
Likewise for np.compat.int.
tests are intentionally left unchanged, as they can be considered as
implicitly testing the np.compat.py3k interface as well.
|
| | | |
|
| |/
|
|
|
|
| |
7-10% speedup in usecols benchmarks; it appears that even in the
single-usecol case, avoiding the iteration over `usecols` more than
compensates the cost of the extra function call to usecols_getter.
|
| |\
| |
| | |
MAINT: In loadtxt, inline read_data.
|
| | |
| |
| |
| |
| |
| | |
No speed difference; the point is to avoid an unnecessary inner
generator (which was previously defined quite far away from its point of
use).
|
| |/ |
|
| |\
| |
| | |
BUG: Ignore whitespaces while parsing gufunc signatures
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | | |
ENH: Allow `np.fromregex` to accept `os.PathLike` implementations
|
| | | | |
|
| |/ / |
|
| | | |
|
| |\ \
| |/
|/| |
PERF: In loadtxt, decide once and for all whether decoding is needed.
|
| | | |
|
| | |
| |
| |
| |
| | |
Mostly to help later speedups, but also slightly optimizes
`len(vals) == 0` into a bool check (in `filter`).
|
| | |
| |
| |
| |
| |
| |
| | |
... and use a single decoder function instead of repeatedly checking the
input type (in `_decode_line`).
~5-8% speedup.
|
| |\ \
| | |
| | | |
MAINT: Proposal to expire three deprecated functions in numpy.lib.npyio
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |
| | | | |
PERF: Simplify some of loadtxt's standard converters.
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Standard converters only ever get called with str inputs (loadtxt
performs the required decoding); saving a bunch of runtime typechecks
(in `asstr`) results in a 15-20% speedup when loadtxt()ing the
corresponding types.
|
| |/ /
| |
| |
| |
| |
| | |
loadtxt only ever calls converters with strs now, so the type check is
unneeded. Skipping the type check may have a tiny performance benefit,
but the main point is just code clarity.
|
| |\ \
| | |
| | | |
TST: Bump the python 3.10 test version from beta4 to rc1
|
| | | |
| | |
| | |
| | | |
Broken in rc1 as of bpo-44524
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
~5-13% speedup: `[*map(conv, items)]` (single converter, which is quite
common) is much faster than `[conv(val) for conv, val in zip(converters,
vals)]`.
`_loadtxt_floatconv` and `fencode` were lifted out so that every
"instance" of them is the same, allowing checking for whether there's
different converters in use (actually, it looks like two `floatconv`s
returned by two separate calls to `_getconv` have the same identity, but
we don't need to rely on that.
|
| | |/
|/|
| |
| |
| | |
`for... else...` seems more idiomatic than manual iteration and catching
StopIteration.
Also rename the slightly cryptic `N` to a clearer `ncols`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* PERF: Speed-up common case of loadtxt()ing non-hex floats.
`python runtests.py --bench bench_io` reports a ~5-10% perf gain.
* TST: Add tests to check fromhex not called unintentionally.
Adds regression tests to check that the logic surrounding when
the default floatconv applies the fromhex conversion does not
change.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|