summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand/Python.pxi
Commit message (Collapse)AuthorAgeFilesLines
* BENCH: convert bencmarks to asv formatmattip2019-05-201-43/+0
| | | | | | | remove files that were part of the origal repo rework randomgen docs to integrate with numpy and fix some links remove convenience functions, require explicit call to gen.brng move code out of numpy.random.randomgen into numpy.random
* BUG: Check for errors when PyInt_AsLong is called in np.randomSimon Gibbons2017-04-021-1/+1
| | | | | | | | | After #8883 was merged it was noticed that the same problem was occuring with calls to PyInt_AsLong. Namely that PyErr_Occoured wasn't being checked if it returned -1 indicating an exception could have been thrown. This PR adds those checks as well as a regression test.
* BUG: Ensure Errors are correctly checked when PyFloat_AsDouble is called.Simon Gibbons2017-04-011-1/+1
| | | | | | | | | | | | | | There was an error in np.random.uniform where if np.random.uniform were called with a type that throwed exceptions when it was converted to a float this exception wouldn't be raised. This bug was due to an issue where PyFloat_AsDouble was called but no check for PyErr_Occurred was performed after. This PR fixes the issue by ensuring that Cython will always emit a call to PyErr_Occurred if PyFloat_AsDouble returns -1.0 Fixes: #8865
* MAINT: Always use PyCapsule instead of PyCObject in mtrand.pyx.Charles Harris2016-04-101-14/+0
| | | | | | Python 2.7 has a backport of PyCapsule so we no longer need to support PyCObject. This PR makes that change and removes the no longer needed mt_compat.h file.
* BUG: core: use PyCapsule objects only on Python >= 3.0, stay with PyCObjects ↵Pauli Virtanen2010-07-171-1/+1
| | | | on Python 2.x
* ENH, BUG: PyCObject will be deprecated in python 2.7. So use the NpyCapsuleCharles Harris2010-05-031-0/+3
| | | | | | | compatibility functions in npy_3kcompat.h to replace the current calls. This gets rid of a number of version checks and is easier to maintain. Fix bug that was present in the ufunc _loop1d_list_free destructor in the python3k case.
* BUG: Replace deprecated PyCObject by PyCapsule for Python >= 3.1.Charles Harris2010-02-231-10/+10
|
* More fixes to mtrand from recent speed ups.Travis Oliphant2007-03-201-0/+1
|
* Make random number generators faster for scalar parameters.Travis Oliphant2007-03-191-2/+14
|
* Make sure we deal with null bytes appropriate when getting a random stream ↵Robert Kern2006-07-201-0/+1
| | | | of bytes as a Python string.
* Add CObject APIRobert Kern2006-06-131-0/+16
|
* Moved scipy directory to numpyTravis Oliphant2006-01-041-0/+24