Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | TST: Expand `TestNanFunctions_NumberTypes` with 0d arrays | Bas van Beek | 2021-09-09 | 1 | -12/+17 |
| | |||||
* | TST: Make nanfunc test ignore overflow instead of xfailing test | Sebastian Berg | 2021-09-07 | 1 | -3/+1 |
| | | | | | | 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). | ||||
* | MAINT: Let `_remove_nan_1d` attempt to identify nan-containing object arrays | Bas van Beek | 2021-09-05 | 1 | -2/+4 |
| | | | | Use the same approach as in numpy/numpy#9013 | ||||
* | MAINT: Copy the `_methods._std` code-path for handling `nanstd` object-arrays | Bas van Beek | 2021-09-04 | 1 | -6/+3 |
| | | | | https://github.com/numpy/numpy/blob/410a89ef04a2d3c50dd2dba2ad403c872c3745ac/numpy/core/_methods.py#L265-L270 | ||||
* | TST: Add more tests for `nanmedian`, `nanquantile` and `nanpercentile` | Bas van Beek | 2021-09-03 | 1 | -0/+17 |
| | |||||
* | TST: Expand the old `TestNanFunctions_IntTypes` test with non-integer number ↵ | Bas van Beek | 2021-09-03 | 1 | -71/+52 |
| | | | | types | ||||
* | BUG: Fixed an issue wherein certain `nan<x>` functions could fail for object ↵ | Bas van Beek | 2021-09-03 | 1 | -3/+20 |
| | | | | arrays | ||||
* | Merge pull request #19815 from mwtoews/maint-ioerror | Charles Harris | 2021-09-02 | 4 | -11/+12 |
|\ | | | | | MAINT: revise OSError aliases (IOError, EnvironmentError) | ||||
| * | MAINT: revise OSError aliases (IOError, EnvironmentError) | Mike Taves | 2021-09-02 | 4 | -11/+12 |
| | | |||||
* | | MAINT: Make the `_SupportsGetItem` protocol positional-only | Bas van Beek | 2021-09-02 | 1 | -1/+1 |
| | | |||||
* | | ENH: Use custom file-like protocols instead of `typing.IO` | Bas van Beek | 2021-09-02 | 1 | -17/+32 |
|/ | |||||
* | Merge pull request #19781 from mwtoews/foreach-item | Matti Picus | 2021-09-01 | 5 | -33/+29 |
|\ | | | | | MAINT: refactor "for ... in range(len(" statements | ||||
| * | MAINT: refactor "for ... in range(len(" statements | Mike Taves | 2021-09-01 | 5 | -33/+29 |
| | | |||||
* | | STY: Use the PEP 457 positional-only syntax in the stub files | Bas van Beek | 2021-08-31 | 4 | -13/+18 |
| | | |||||
* | | MAINT: Drop .pyi code-paths specific to Python 3.7 | Bas van Beek | 2021-08-30 | 9 | -38/+12 |
|/ | |||||
* | Merge pull request #19725 from anntzer/loadtxt-fh-closing | Matti Picus | 2021-08-26 | 1 | -14/+12 |
|\ | | | | | MAINT: Use a contextmanager to ensure loadtxt closes the input file. | ||||
| * | MAINT: Use a contextmanager to ensure loadtxt closes the input file. | Antony Lee | 2021-08-22 | 1 | -14/+12 |
| | | | | | | | | | | | | | | | | 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`. | ||||
* | | MAINT: Avoid use of confusing compat aliases. | Antony Lee | 2021-08-24 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | 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. | ||||
* | | STY: Slight style change | Charles Harris | 2021-08-22 | 1 | -1/+1 |
| | | |||||
* | | PERF: Optimize loadtxt usecols. | Antony Lee | 2021-08-22 | 1 | -10/+15 |
|/ | | | | | | 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. | ||||
* | Merge pull request #19693 from anntzer/loadtxtinlinereaddata | Charles Harris | 2021-08-22 | 1 | -33/+18 |
|\ | | | | | MAINT: In loadtxt, inline read_data. | ||||
| * | MAINT: In loadtxt, inline read_data. | Antony Lee | 2021-08-17 | 1 | -33/+18 |
| | | | | | | | | | | | | No speed difference; the point is to avoid an unnecessary inner generator (which was previously defined quite far away from its point of use). | ||||
* | | DOC: Fix typo in `unwrap` docstring. | Ghiles Meddour | 2021-08-17 | 1 | -1/+1 |
|/ | |||||
* | Merge pull request #19627 from ankitdwivedi23/ankitd/vectorize-ignore-whitespace | Charles Harris | 2021-08-16 | 2 | -0/+17 |
|\ | | | | | BUG: Ignore whitespaces while parsing gufunc signatures | ||||
| * | replace whitespaces in the signature argument | Ankit Dwivedi | 2021-08-12 | 1 | -4/+5 |
| | | |||||
| * | dummy change to kick off another build | Ankit Dwivedi | 2021-08-08 | 1 | -1/+1 |
| | | |||||
| * | fix lint errors | Ankit Dwivedi | 2021-08-07 | 2 | -2/+4 |
| | | |||||
| * | ignore whitespaces while parsing gufunc signatures | Ankit Dwivedi | 2021-08-07 | 1 | -3/+3 |
| | | |||||
| * | add tests to check if whitespaces are ignored in gufunc signatures | Ankit Dwivedi | 2021-08-07 | 1 | -0/+14 |
| | | |||||
* | | Merge pull request #19680 from BvB93/fromregex | Charles Harris | 2021-08-16 | 3 | -5/+11 |
|\ \ | | | | | | | ENH: Allow `np.fromregex` to accept `os.PathLike` implementations | ||||
| * | | ENH: Allow `np.fromregex` to accept `os.PathLike` implementations | Bas van Beek | 2021-08-16 | 3 | -5/+11 |
| | | | |||||
* | | | ENH: Add annotations for `np.lib.stride_tricks` | Bas van Beek | 2021-08-16 | 1 | -9/+75 |
|/ / | |||||
* | | ENH: Add annotations for `np.lib.npyio` | Bas van Beek | 2021-08-13 | 1 | -81/+232 |
| | | |||||
* | | Merge pull request #19609 from anntzer/loadtxtstaticdecoder | Charles Harris | 2021-08-11 | 1 | -26/+38 |
|\ \ | |/ |/| | PERF: In loadtxt, decide once and for all whether decoding is needed. | ||||
| * | Move loadtxt bytes/str detection much earlier. | Antony Lee | 2021-08-06 | 1 | -14/+21 |
| | | |||||
| * | loadtxt: Preconstruct a (lineno, words) iterator to pass to read_data. | Antony Lee | 2021-08-06 | 1 | -21/+20 |
| | | | | | | | | | | Mostly to help later speedups, but also slightly optimizes `len(vals) == 0` into a bool check (in `filter`). | ||||
| * | PERF: In loadtxt, decide once and for all whether decoding is needed. | Antony Lee | 2021-08-06 | 1 | -6/+12 |
| | | | | | | | | | | | | | | ... and use a single decoder function instead of repeatedly checking the input type (in `_decode_line`). ~5-8% speedup. | ||||
* | | Merge pull request #19615 from rossbar/rm-deprecated-npyio-fns | Charles Harris | 2021-08-06 | 4 | -96/+2 |
|\ \ | | | | | | | MAINT: Proposal to expire three deprecated functions in numpy.lib.npyio | ||||
| * | | Rm numpy.lib.npyio.mafromtxt. | Ross Barnowski | 2021-08-05 | 3 | -43/+1 |
| | | | |||||
| * | | Rm numpy.lib.npyio.ndfromtxt. | Ross Barnowski | 2021-08-05 | 3 | -41/+1 |
| | | | |||||
| * | | Rm numpy.lib.npyio.loads. | Ross Barnowski | 2021-08-05 | 3 | -13/+1 |
| | | | |||||
* | | | Merge pull request #19620 from anntzer/loadtxtconvstr | Charles Harris | 2021-08-06 | 1 | -5/+5 |
|\ \ \ | | | | | | | | | PERF: Simplify some of loadtxt's standard converters. | ||||
| * | | | PERF: Simplify some of loadtxt's standard converters. | Antony Lee | 2021-08-06 | 1 | -5/+5 |
| | |/ | |/| | | | | | | | | | | | | | | | | 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. | ||||
* | | | MAINT: Skip a type check in loadtxt when using user converters. | Antony Lee | 2021-08-06 | 1 | -6/+4 |
|/ / | | | | | | | | | | | 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. | ||||
* | | Merge pull request #19612 from BvB93/test | Charles Harris | 2021-08-06 | 1 | -1/+5 |
|\ \ | | | | | | | TST: Bump the python 3.10 test version from beta4 to rc1 | ||||
| * | | TST: Skip `test_lookfor` in 3.10rc1 | Bas van Beek | 2021-08-06 | 1 | -1/+5 |
| | | | | | | | | | | | | Broken in rc1 as of bpo-44524 | ||||
* | | | PERF: Special-case single-converter in loadtxt. | Antony Lee | 2021-08-06 | 1 | -42/+50 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~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. | ||||
* | | | MAINT: In loadtxt, refactor detection of the number of columns. (#19616) | Antony Lee | 2021-08-05 | 1 | -15/+12 |
| |/ |/| | | | | | | | `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. (#19598) | Antony Lee | 2021-08-05 | 2 | -4/+31 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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> | ||||
* | | Merge pull request #19608 from anntzer/loadtxtspecialpacker | Matti Picus | 2021-08-04 | 1 | -11/+16 |
|\ \ | | | | | | | PERF: Specialize loadtxt packer for uniform-dtype data. |