summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_regression.py
Commit message (Collapse)AuthorAgeFilesLines
* index_tricks.py file not modifiedshubham119411402021-08-191-2/+2
|
* conversion of strings to fstringsJakob2020-10-241-2/+2
|
* MAINT: simplify code that assumes str/unicode and int/long are different ↵Eric Wieser2020-03-261-8/+0
| | | | | types (#15816) Cleanup from the dropping of python 2
* NEP: issue deprecation warning when creating ragged array (NEP 34)Matti Picus2020-01-211-2/+3
| | | | This implements NEP 34.
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-2/+2
| | | | | | | 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.
* Revert "DEP: issue deprecation warning when creating ragged array (NEP 34)"revert-14794-nep-0034-implRalf Gommers2019-12-061-3/+2
|
* MAINT: revert change to assert_array_equal, adjust testsmattip2019-10-311-1/+2
|
* DEP: issue deprecation warning when creating ragged array (NEP 34)mattip2019-10-311-1/+1
|
* STY: Clean up codeKevin Sheppard2019-05-271-1/+2
| | | | | | Pep8 fixes Remove unused imports Fix name error
* BUG: Fix in-place permutationKevin Sheppard2018-10-101-0/+22
| | | | | | | Alter test to check if arrays are the same to avoid in-place of some array-like objects closes #11975
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-4/+1
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Remove unittest dependencies in numpy/random/tests.Charles Harris2017-07-241-3/+4
|
* BUG: Buttress handling of extreme values in randintgfyoung2017-05-091-9/+0
|
* BUG: Fix segfaults in np.random.shuffleSimon Gibbons2016-06-101-0/+29
| | | | | | | | | | | | | | | | np.random.shuffle will allocate a buffer based on the size of the first element of an array of strings. If the first element is smaller than another in the array this buffer will overflow, causing a segfault when garbage is collected. Additionally if the array contains objects then one would be left in the buffer and have it's refcount erroniously decrimented on function exit, causing that object to be deallocated too early. To fix this we change the buffer to be an array of int8 of the the size of the array's dtype, which sidesteps both issues. Fixes #7710
* TST: fix OverflowError on win-amd64Christoph Gohlke2015-08-011-1/+1
|
* MAINT: adjust tolerance for validating the sum of probs in random.choicealex2015-07-291-1/+13
|
* BUG: np.random.beta with small parameters produces NaNsJaime Fernandez2015-05-101-0/+8
| | | | Fixes #5851
* BUG: Fix potential overflows in rk_hypergeometric_hrua()Anton Ovchinnikov2015-03-031-0/+11
|
* STY: PEP8 fixups for numpy/random.Charles Harris2014-07-311-1/+1
|
* Merge pull request #3243 from seberg/deprecate-non-integer-arguments-newCharles Harris2013-06-091-1/+1
|\ | | | | Deprecate non integer arguments
| * STY: Style fixes for integer deprecation changesSebastian Berg2013-06-091-1/+1
| | | | | | | | Also minor changes in the documentation.
| * MAINT: adept divisions for truedivideSebastian Berg2013-05-311-1/+1
| | | | | | | | Following deprecations would cause problems otherwise.
* | TST: remove docstrings from test_ functionsChristoph Gohlke2013-05-271-13/+8
| | | | | | | | See doc/TESTS.rst.txt for the reason.
* | BUG: Fix multivariate_normal issue with 'size' argumentChristoph Gohlke2013-05-271-5/+16
| | | | | | | | Ensure that the multivariate_normal size argument can be a numpy integer. Add regression test. Apply PEP8 to test_regression.py. Regenerate mtrand.c.
* | TST: remove docstring from test_randint_range functionChristoph Gohlke2013-05-271-1/+1
| | | | | | See doc/TESTS.rst.txt for the reason.
* | TST: rename one test_hypergeometric_range functionChristoph Gohlke2013-05-271-1/+1
|/ | | There are two test functions named `test_hypergeometric_range`
* 2to3: Apply the `numliterals` fixer and skip the `long` fixer.Charles Harris2013-04-131-1/+2
| | | | | | | | | | | | | | | | | | | The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067.
* 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: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+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.
* BUG: internal call fix in random.choiceSebastian Berg2012-12-151-0/+10
| | | | | | An random.random call from within mtrand was done by a call to np.random.random instead of inside the class. This can possibly lead to non-deterministic results after seeding.
* [FIX] Make np.random.shuffle less brain-deadNathaniel J. Smith2012-07-171-0/+10
| | | | | | | | | The logic in np.random.shuffle was... not very sensible. Fixes trac ticket #2074. This patch also exposes a completely unrelated issue in numpy.testing. Filed as Github issue #347 and marked as knownfail for now.
* ENH: Break out regression tests into separate file and explicitly import neededCharles Harris2011-01-241-0/+57
functions from np.testing.