summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_twodim_base.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: remove `NUMPY_EXPERIMENTAL_ARRAY_FUNCTION` env varRalf Gommers2023-03-121-9/+2
| | | | | | | | As discussed in https://mail.python.org/archives/list/numpy-discussion@python.org/thread/UKZJACAP5FUG7KP2AQDPE4P5ADNWLOHZ/ This flag was always meant to be temporary, and cleaning it up is long overdue.
* BUG: lib: Allow type uint64 for eye() arguments.warren2022-05-111-1/+7
| | | | | | Closes gh-9982. (Plus a few small PEP 8 fixes.)
* ENH: Check that the lengths of the inputs to histogram2d are the same. (#20228)Jérome Eertmans2021-11-021-0/+10
| | | | | | | Improves exception message when inputs have different shapes. Closes gh-20050 Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-10/+10
| | | | | | | 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.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUG: further fixup to histogram2d dispatcher.Marten van Kerkwijk2019-06-201-1/+25
| | | | Now with tests....
* MAINT: Rename histogramdd's normed argument to density, to match histogramEric Wieser2018-07-081-3/+3
| | | | Fixes gh-4371
* STY: Some PEP8 fixes in lib/tests/test_twodim_base.py.Charles Harris2018-04-081-16/+17
|
* TST: Remove yield tests in lib/tests/test_twodim_base.py.Charles Harris2018-04-081-12/+12
|
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-8/+4
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* ENH: Add `order=` keyword to `np.eye()` (#9996)Danny Hermes2017-11-121-0/+9
| | | Fixes #9995
* TST: Remove unittest dependencies in numpy/lib/tests.Charles Harris2017-07-241-60/+61
|
* MAINT: Remove asbytes_nested where b prefixes would sufficeEric Wieser2017-03-251-2/+1
|
* ENH: Remove warning ignoring from nanfuncsSebastian Berg2016-09-021-1/+1
| | | | | | Comment mentions a speedup, but it seems unsure why it should be there. Instead use an error state in divide_by_count. Some extra complex warnings had to be ignored (but those seemed correct)
* Merge pull request #7347 from erensezener/generalized_rot90Charles Harris2016-06-221-32/+1
|\ | | | | ENH Generalized rot90
| * ENH: generalize rot90 with axes kwarg, move to function_base.py, and add testsDenis Alevi2016-03-201-32/+1
| |
* | TST: fix test error due to use of deprecated np.testing.rand utility.Ralf Gommers2016-05-161-4/+4
|/
* DOC: Updated docstring for histogram2d as suggested in issue #5538Åsmund Hjulstad2015-02-131-0/+31
| | | | Also, added unittest for [int, array] combination arguments
* Merge pull request #4929 from juliantaylor/charris-pep8-numpy-libCharles Harris2014-07-311-35/+35
|\ | | | | Charris pep8 numpy lib
| * STY: PEP8 compliance for numpy/lib/tests.Charles Harris2014-07-311-34/+34
| | | | | | | | | | | | | | The possibly controversial part of this is making the nested array value lists PEP8 compliant, as there is something to be said aligning the values for clarity. In the end, it seemed like the easiest thing to do was to make them PEP8 compliant. The eye can get used to that.
| * MAINT: Fix problems noted by pyflakes in numpy/lib/tests.Charles Harris2014-07-311-1/+1
| |
* | BUG: Avoid type promotion in tril and triu.Yotam Doron2014-07-291-0/+22
| |
* | BUG: Use `np.where` in np.triu/np.tril, fixes #4859jaimefrio2014-07-101-0/+12
|/ | | | | Replaces the current method to zero items, from multiplication to using `np.where`.
* TST: fix random failing histogram testJulian Taylor2014-05-301-1/+1
| | | | | histogramdd rounds by decimal=6 so the random numbers may not be outliers if they are below 1. + 1e6
* ENH: speed-up of triangular matrix functionsjaimefrio2014-03-251-5/+39
| | | | | | | | | | | | | | | * `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`.
* ENH: tril and triu broadcastingalex2014-02-241-5/+29
|
* MAINT: lib: Use a consistent PEP8-compliant import style in twodim_base.py ↵Warren Weckesser2013-11-021-8/+12
| | | | and tests/test_twodim_base.py. Also make a couple more PEP8 tweaks.
* ENH: lib: Rewrite vander: make it faster, and add an option to specify the ↵Warren Weckesser2013-11-021-1/+35
| | | | order of the powers (either decreasing or increasing).
* MAINT: Don't use 'import *' in lib/test_twodim_base.py.Warren Weckesser2013-11-021-1/+3
|
* STY: Make numpy/lib/test/*.py PEP8 compliant.Charles Harris2013-09-031-81/+111
| | | | | | | Run autopep8 over the test files in numpy/lib/test and make fixes to the result. Also remove Python5 workaround.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-101/+101
| | | | | | | 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.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Replace xrange by range and use list(range(...)) where neededCharles Harris2013-03-271-1/+1
| | | | | | | | | | | | | | | In python3 range is an iterator and `xrange` has been removed. This has two consequence for code: 1) Where a list is needed `list(range(...))` must be used. 2) `xrange` must be replaced by `range` Both of these changes also work in python2 and this patch makes both. There are three places fixed that do not need it, but I left them in so that the result would be `xrange` clean. Closes #3092
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-1/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* FIX: Make tril/triu return the same dtype as the original array.Fabian Pedregosa2011-08-311-0/+12
| | | | | | | This should fix: * http://projects.scipy.org/numpy/ticket/1848 * http://projects.scipy.org/scipy/ticket/1449
* BUG: fixed histogramdd bug with empty inputs. Closes #1899.David Huard2011-07-241-1/+4
|
* STY: Replace old style classes in tests with classes subclassing object.Charles Harris2011-04-051-3/+3
|
* BUG: Python 2.4 doesn't accept the construction class foo():Charles Harris2011-04-051-3/+3
|
* BUG: fix test issues in test_twodim_base.py. Simplify and make tests run.Ralf Gommers2011-04-031-64/+60
|
* ENH: Make all histogram functions work with empty input.Ralf Gommers2011-03-271-0/+4
|
* BUG: Fix missing 'self' in test cleanups.Charles Harris2010-08-101-2/+2
|
* ENH: Add some tests for ticket #1579. Do some cleanups.Charles Harris2010-08-101-69/+88
|
* 3K: lib: fix bytes vs str issues in testsPauli Virtanen2010-02-211-1/+3
|
* DEP: Fix deprecation warnings in Python 3.1. The warnings come from the unittestCharles Harris2010-02-201-3/+3
| | | | | | | | | module. The fix should be good for Python >= 2.4 and used the following sed script: s/\<failUnless\>/assertTrue/g s/\<failIf\>/assertFalse/g s/\<failUnlessEqual\>/assertEqual/g s/\<failUnlessRaises\>/assertRaises/g
* Address #1167: faster twodim_base.diag/eye implementation by Luca Citi + testsPauli Virtanen2009-07-121-2/+36
|
* Fix twodim tests.Stefan van der Walt2009-07-041-1/+1
|
* Add indexing functions by Fernando Perez.Stefan van der Walt2009-07-041-18/+92
|
* ran reindentJarrod Millman2008-08-081-1/+0
|
* Remove uses of set_package_path, set_local_path, restore_path.Alan McIntyre2008-07-031-5/+0
| | | | | Clean up and (somewhat) standardize test module imports. Removed unneeded reload calls.