| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
| |
* Remove unused imports.
|
| |
|
|
|
|
| |
Now with tests....
|
| |
|
|
|
|
| |
fixes GH-13728
|
|
|
|
|
|
| |
* as requested by review in gh-12634,
the vast majority of docstring matplotlib
imports can be simplified to a single line
|
|
|
|
|
|
|
| |
* there is no longer any usage of "agg"
backend switching in our docstrings because
this backend is already activated in
the refguide_check machinery
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes GH-12271
Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to
``'numpy'``, or appears in an explicit whitelist of undocumented functions and
exported bulitins. These should eventually be documented or removed.
I also identified a handful of functions for which I had accidentally not setup
dispatch for with ``__array_function__`` before, because they were listed under
"ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in
trusting code comments :).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: __array_function__ support for np.lib, part 2
xref GH12028
np.lib.npyio through np.lib.ufunclike
* Fix failures in numpy/core/tests/test_overrides.py
* CLN: handle depreaction in dispatchers for np.lib.ufunclike
* CLN: fewer dispatchers in lib.twodim_base
* CLN: fewer dispatchers in lib.shape_base
* CLN: more dispatcher consolidation
* BUG: fix test failure
* Use all method instead of function in assert_equal
* DOC: indicate n is array_like in scimath.logn
* MAINT: updates per review
* MAINT: more conservative changes in assert_array_equal
* MAINT: add back in comment
* MAINT: casting tweaks in assert_array_equal
* MAINT: fixes and tests for assert_array_equal on subclasses
|
|
|
|
| |
Fixes gh-4371
|
|
|
|
|
|
|
|
|
|
| |
Previously a fuzzy rounded comparison was used for the rightmost bin of histogramdd.
It's not clear why this was done, and it resulted in surprising behavior.
This also removes the restriction that bin edges must be floats, and allows integer arrays to be passed (and returned)
Fixes gh-10864
|
|
|
| |
Fixes #9995
|
|
|
|
| |
nonzero is a clearer spelling
|
|
|
|
|
| |
If nx and ny are the bin counts (as stated in the bins argument's text), then the return H has indeed shape (nx, ny). However, the returned xedges and yedges will then have shape (nx+1,) and (ny+1,) respectively.
Fixes #8979
|
|
|
|
| |
Closes #8115.
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes gh-6863.
|
|
|
|
| |
Also, added unittest for [int, array] combination arguments
|
|
|
|
|
|
|
|
| |
This is an ugly hack to preserve backwards compatibility for code
that uses matrices. It is needed since both diag and diagonal have
been changed to preserve subtypes otherwise.
Note that a.diagonal() still returns matrices when a is a matrix.
|
| |
|
|
|
|
|
|
|
| |
If x is a matrix, np.diag(x) and np.diagonal(x) now return matrices
instead of arrays. Both of these cause x.diagonal() to be called.
That means they return row vectors (just like x.flatten(), x.ravel(),
x.cumprod(), etc.)
|
|\
| |
| | |
Charris pep8 numpy lib
|
| |
| |
| |
| |
| |
| | |
Some of those problems look like potential coding errors. In those
cases a Fixme comment was made and the offending code, usually an
unused variable, was commented out.
|
| | |
|
|/
|
|
|
| |
Replaces the current method to zero items, from multiplication to
using `np.where`.
|
|
|
|
| |
Replace an explicit type check with setting `copy=False` in call to `astype`.
|
|
|
|
|
| |
Speeds calculation up by ~3x for 100x100 matrices, and by ~45x for
1000x1000
|
|
|
|
| |
reduces buffer copy and comparison overhead for boolean outer product
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* `np.tri` now produces less intermediate arrays. Runs about 40% faster for
general dtypes, up to 3x faster for boolean arrays.
* `np.tril` now does smarter type conversions (thanks Julian!), and together
with the improvements in `np.tri` now runs about 30% faster. `np.triu`
runs almost 2x faster than before, but still runs 20% slower than
`np.tril`, which is an improvement over the 50% difference before.
* `np.triu_indices` and `np.tril_indices` do not call `np.mask_indices`,
instead they call `np.where` directly on a boolean array created with
`np.tri`. They now run roughly 2x faster.
* Removed the constraint for the array to be square in calls to
`np.triu_indices`, `np.tril_indices`, `np.triu_indices_from` and
`np.tril_indices_from`.
|
|
|
|
|
|
|
|
|
|
| |
The documentation misrepresented what happened, leaving out division
by the total number of sample points.
Also run spellcheck over function_base.py and twodim_base.py and break
some long lines.
Closes #2423.
|
| |
|
|\
| |
| | |
DOC: Remove \n from strings in plot examples.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The \n occur in plot titles and mess up the generated html. An
alternative fix would be to use a raw docstring or \\n, but here
it looks simpler to just delete the problem.
Closes #4092.
|
|/
|
|
|
|
| |
Docstring claimed 2-D was not required, but it is. Fix that.
Closes #3332.
|
| |
|
| |
|
|
|
|
| |
and tests/test_twodim_base.py. Also make a couple more PEP8 tweaks.
|
|
|
|
| |
more PEP8 tweaks.
|
| |
|
|
|
|
| |
order of the powers (either decreasing or increasing).
|
|
|
|
|
|
|
| |
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long
and will need to be broken at some point. OTOH, some lines were already
too long and need to be broken at some point. Now seems as good a time
as any to do this with open PRs at a minimum.
|
| |
|
| |
|
|\
| |
| | |
Updated documentation for histogram2d() in twodim_base.py according to discussion
|
| | |
|