summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand/numpy.pxd
Commit message (Collapse)AuthorAgeFilesLines
* BENCH: convert bencmarks to asv formatmattip2019-05-201-163/+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
* BUILD: move files out of _randomgenmattip2019-05-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first cut at building randomgen upgrade 'cythonize' and fix absolute imports to relative define NPY_NO_DEPRECATED_API and fix other warnings enable pgc64 by always using PCG_EMULATED_MATH refactor so import randomgen works add TODO comments for pcg64 improvements fix imports, module name in setup.py; remove _testing make cythonize non-recursive, restore examples to proper place update to randomgen 7bca296c0b9 replace mtrand with LegacyGenerator, tweak for compatibility port f879ef4 to fix GH10839 minimized difference between generator.pyx and _legacy.pyx fix namespace in doctests, mark results that are random update to randomgen commit 95c8cdd1c Incorporate testing of edge cases into main tests Rename test files to describe their purpose Import import locations to reflect numpy paths Correct tolerance on float32 tests Remove set_printoptions Remove complex normal Remove future imports Pull in BasicRNG source changes from original author Small doc fixes _mtrand => _rand Improve consistency of nan handling Prevent nans prducing values from int functions add randomgen documentation to the tree
* MAINT: Prepare master for 1.17.0 development.Charles Harris2018-12-081-0/+2
| | | | | | | | | | | | - Create 1.17.0-notes - Update index.rst for new notes - Update pavement.py - Update setup.py - Remove Python 2.7 and 3.4 from CI testing. - Add `# cython: language_level=3` to `*.pxd`, `*.pyx` files. Note that this removes support for both Python2.7 and Python3.4 in setup.py.
* DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with ↵Matti Picus2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITEBACKIFCOPY (#9639) * ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
* MAINT,BUG: Fix mtrand for Cython 0.27.Charles Harris2017-09-251-1/+11
| | | | | | | The `import_array()` macro, that defined a C code block that included a return, was not handled correctly. The fix here is to cdef a replacement `import_array` function with a defined error return. The new function is a slight variation of the corresponding function defined by Cython.
* REF: Remove direct access to flatiter typesKevin Sheppard2017-08-221-0/+1
| | | | | | Replace direct access wiht Macro closes #3144
* MAINT: Always use PyCapsule instead of PyCObject in mtrand.pyx.Charles Harris2016-04-101-6/+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.
* ENH: Add dtype argument to random.randint.Charles Harris2016-01-021-0/+16
| | | | | | | | | | | | | | | | | | | | | Random ndarrays of the following types can now be generated: * np.bool, * np.int8, np.uint8, * np.int16, np.uint16, * np.int32, np.uint32, * np.int64, np.uint64, * np.int_ (long), np.intp The specification is by precision rather than by C type. Hence, on some platforms np.int64 may be a `long` instead of `long long` even if the specified dtype is `long long` because the two may have the same precision. The resulting type depends on which c type numpy uses for the given precision. The byteorder specification is also ignored, the generated arrays are always in native byte order. The dtype of the result could be made more explicit if desired without changing the user visible results.
* BUG: reject too large seeds to RandomStateJulian Taylor2014-05-151-0/+2
| | | | | | mtrand accepts seeds larger than 32 bit but silently truncates them back to 32 bit. This can lead to accidentally getting the same random stream for two different seeds, e.g. 1 and 1 + 2**40.
* ENH: replace GIL of random module with a per state lockJulian Taylor2014-05-021-4/+4
| | | | | | | | | | | | | | | The random module currently relies on the GIL for the state synchronization which hampers threading performance. Instead add a lock to the RandomState object and take it for all operations calling into randomkit while releasing the GIL. This allows parallizing random number generation using multiple states or asynchronous generation in a worker thread. Note that with a large number of threads the standard mersenne twister used may exhibit overlap if the number of parallel streams is large compared to the size of the state space, though due to the limited scalability of Python in regards to threads this is likely not a big issue.
* UPD: Make numpy.pxd and mtrand.pyx use non-deprecated macros/functions.Charles Harris2012-04-061-38/+45
| | | | | | | The non-deprecated macros and functions were defined for Cython in numpy.pxd and mtrand was fixed to use them. In particular, direct access to structure internals in mtrand.pyx needed to be replaced by the new access functions.
* MOV: Rename numpy.pxi to numpy.pxd to conform to current Cython.Charles Harris2012-04-061-0/+133