summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/__init__.py1
-rw-r--r--numpy/add_newdocs.py2
-rw-r--r--numpy/core/_methods.py1
-rw-r--r--numpy/core/arrayprint.py1
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py2
-rw-r--r--numpy/core/fromnumeric.py19
-rw-r--r--numpy/core/function_base.py1
-rw-r--r--numpy/core/include/numpy/npy_common.h1
-rw-r--r--numpy/core/shape_base.py1
-rw-r--r--numpy/core/src/multiarray/arrayobject.c16
-rw-r--r--numpy/core/src/multiarray/common.c14
-rw-r--r--numpy/core/src/multiarray/common.h2
-rw-r--r--numpy/core/src/multiarray/conversion_utils.c4
-rw-r--r--numpy/core/src/multiarray/convert_datatype.c6
-rw-r--r--numpy/core/src/multiarray/ctors.c4
-rw-r--r--numpy/core/src/multiarray/dtype_transfer.c1
-rw-r--r--numpy/core/src/multiarray/flagsobject.c2
-rw-r--r--numpy/core/src/multiarray/iterators.c8
-rw-r--r--numpy/core/src/multiarray/mapping.c18
-rw-r--r--numpy/core/src/multiarray/methods.c2
-rw-r--r--numpy/core/src/multiarray/multiarraymodule.c2
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src2
-rw-r--r--numpy/core/src/multiarray/shape.c2
-rw-r--r--numpy/core/src/npymath/halffloat.c1
-rw-r--r--numpy/core/src/npymath/ieee754.c.src3
-rw-r--r--numpy/core/src/npysort/selection.c.src2
-rw-r--r--numpy/core/src/private/npy_partition.h1
-rw-r--r--numpy/core/src/scalarmathmodule.c.src2
-rw-r--r--numpy/core/src/umath/loops.h1
-rw-r--r--numpy/core/src/umath/operand_flag_tests.c.src2
-rw-r--r--numpy/core/src/umath/reduction.c2
-rw-r--r--numpy/core/src/umath/ufunc_type_resolution.c4
-rw-r--r--numpy/core/tests/test_api.py2
-rw-r--r--numpy/core/tests/test_dtype.py4
-rw-r--r--numpy/core/tests/test_function_base.py1
-rw-r--r--numpy/core/tests/test_item_selection.py2
-rw-r--r--numpy/core/tests/test_multiarray.py4
-rw-r--r--numpy/core/tests/test_shape_base.py2
-rw-r--r--numpy/core/tests/test_ufunc.py44
-rw-r--r--numpy/distutils/command/build_clib.py2
-rw-r--r--numpy/distutils/command/config.py2
-rw-r--r--numpy/distutils/conv_template.py4
-rw-r--r--numpy/distutils/extension.py2
-rw-r--r--numpy/doc/basics.py1
-rw-r--r--numpy/doc/broadcasting.py1
-rw-r--r--numpy/doc/byteswapping.py1
-rw-r--r--numpy/doc/creation.py1
-rw-r--r--numpy/doc/glossary.py1
-rw-r--r--numpy/doc/howtofind.py1
-rw-r--r--numpy/doc/indexing.py1
-rw-r--r--numpy/doc/internals.py1
-rw-r--r--numpy/doc/io.py1
-rw-r--r--numpy/doc/jargon.py1
-rw-r--r--numpy/doc/methods_vs_functions.py1
-rw-r--r--numpy/doc/misc.py1
-rw-r--r--numpy/doc/performance.py1
-rw-r--r--numpy/doc/structured_arrays.py3
-rw-r--r--numpy/doc/subclassing.py1
-rw-r--r--numpy/doc/ufuncs.py1
-rw-r--r--numpy/f2py/NEWS.txt2
-rw-r--r--numpy/f2py/TODO.txt2
-rwxr-xr-xnumpy/f2py/crackfortran.py2
-rw-r--r--numpy/f2py/doc/Release-2.x.txt6
-rw-r--r--numpy/f2py/doc/Release-3.x.txt10
-rw-r--r--numpy/f2py/doc/Release-4.x.txt10
-rw-r--r--numpy/f2py/doc/f2python9-final/README.txt4
-rw-r--r--numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt2
-rw-r--r--numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt2
-rw-r--r--numpy/f2py/doc/multiarray/array_from_pyobj.c4
-rw-r--r--numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt6
-rw-r--r--numpy/f2py/doc/multiarray/transpose.txt97
-rw-r--r--numpy/f2py/doc/multiarrays.txt3
-rw-r--r--numpy/f2py/doc/using_F_compiler.txt8
-rw-r--r--numpy/f2py/docs/FAQ.txt10
-rw-r--r--numpy/f2py/docs/HISTORY.txt85
-rw-r--r--numpy/f2py/docs/OLDNEWS.txt2
-rw-r--r--numpy/f2py/docs/README.txt26
-rw-r--r--numpy/f2py/docs/TESTING.txt2
-rw-r--r--numpy/f2py/docs/THANKS.txt2
-rw-r--r--numpy/f2py/docs/usersguide/index.txt66
-rw-r--r--numpy/f2py/func2subr.py5
-rw-r--r--numpy/fft/fftpack.py12
-rw-r--r--numpy/fft/helper.py12
-rw-r--r--numpy/lib/index_tricks.py2
-rw-r--r--numpy/lib/tests/test_index_tricks.py2
-rw-r--r--numpy/lib/type_check.py1
-rw-r--r--numpy/lib/user_array.py2
-rw-r--r--numpy/linalg/_gufuncs_linalg.py24
-rw-r--r--numpy/linalg/lapack_lite/blas_lite.c1
-rw-r--r--numpy/linalg/lapack_lite/dlamch.c548
-rw-r--r--numpy/linalg/lapack_lite/dlapack_lite.c1
-rw-r--r--numpy/linalg/lapack_lite/zlapack_lite.c1
-rw-r--r--numpy/linalg/setup.py4
-rw-r--r--numpy/linalg/tests/test_gufuncs_linalg.py14
-rw-r--r--numpy/linalg/umath_linalg.c.src8
-rw-r--r--numpy/ma/API_CHANGES.txt3
-rw-r--r--numpy/ma/README.txt4
-rw-r--r--numpy/matrixlib/tests/test_regression.py1
-rw-r--r--numpy/numarray/include/numpy/cfunc.h1
-rw-r--r--numpy/numarray/include/numpy/ieeespecial.h1
-rw-r--r--numpy/oldnumeric/tests/test_regression.py1
-rw-r--r--numpy/random/mtrand/distributions.c82
-rw-r--r--numpy/random/mtrand/distributions.h20
-rw-r--r--numpy/random/mtrand/mtrand.c1356
-rw-r--r--numpy/testing/noseclasses.py2
-rw-r--r--numpy/testing/nosetester.py1
-rw-r--r--numpy/testing/utils.py1
107 files changed, 1314 insertions, 1364 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py
index b4be4d707..532ec14c8 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -195,4 +195,3 @@ else:
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
-
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 65a416a9f..2b066dee8 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -2648,7 +2648,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('flags',
or the ultimate owner of the memory exposes a writeable buffer
interface or is a string.
- Arrays can be both C-style and Fortran-style contiguous simultaneously.
+ Arrays can be both C-style and Fortran-style contiguous simultaneously.
This is clear for 1-dimensional arrays, but can also be true for higher
dimensional arrays.
diff --git a/numpy/core/_methods.py b/numpy/core/_methods.py
index 27e445a54..8f0027616 100644
--- a/numpy/core/_methods.py
+++ b/numpy/core/_methods.py
@@ -121,4 +121,3 @@ def _std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False):
ret = ret.dtype.type(um.sqrt(ret))
return ret
-
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index ad6a5d074..18b008a3f 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -750,4 +750,3 @@ class TimedeltaFormat(object):
def __call__(self, x):
return self.format % x.astype('i8')
-
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 53ccfcfda..59e877750 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -2199,7 +2199,7 @@ add_newdoc('numpy.core.umath', 'maximum',
The maximum value of an array along a given axis, propagating any NaNs.
nanmax :
The maximum value of an array along a given axis, ignoring any NaNs.
-
+
fmin, amin, nanmin
Notes
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index cb1c4ff05..1af1fea16 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -106,7 +106,7 @@ def take(a, indices, axis=None, out=None, mode='raise'):
array([4, 3, 6])
If `indices` is not one dimensional, the output also has these dimensions.
-
+
>>> np.take(a, [[0, 1], [2, 3]])
array([[4, 3],
[5, 7]])
@@ -2077,9 +2077,9 @@ def amax(a, axis=None, out=None, keepdims=False):
Element-wise maximum of two arrays, propagating any NaNs.
fmax :
Element-wise maximum of two arrays, ignoring any NaNs.
- argmax :
+ argmax :
Return the indices of the maximum values.
-
+
nanmin, minimum, fmin
Notes
@@ -2087,9 +2087,9 @@ def amax(a, axis=None, out=None, keepdims=False):
NaN values are propagated, that is if at least one item is NaN, the
corresponding max value will be NaN as well. To ignore NaN values
(MATLAB behavior), please use nanmax.
-
+
Don't use `amax` for element-wise comparison of 2 arrays; when
- ``a.shape[0]`` is 2, ``maximum(a[0], a[1])`` is faster than
+ ``a.shape[0]`` is 2, ``maximum(a[0], a[1])`` is faster than
``amax(a, axis=0)``.
Examples
@@ -2161,7 +2161,7 @@ def amin(a, axis=None, out=None, keepdims=False):
Element-wise minimum of two arrays, propagating any NaNs.
fmin :
Element-wise minimum of two arrays, ignoring any NaNs.
- argmin :
+ argmin :
Return the indices of the minimum values.
nanmax, maximum, fmax
@@ -2171,9 +2171,9 @@ def amin(a, axis=None, out=None, keepdims=False):
NaN values are propagated, that is if at least one item is NaN, the
corresponding min value will be NaN as well. To ignore NaN values
(MATLAB behavior), please use nanmin.
-
- Don't use `amin` for element-wise comparison of 2 arrays; when
- ``a.shape[0]`` is 2, ``minimum(a[0], a[1])`` is faster than
+
+ Don't use `amin` for element-wise comparison of 2 arrays; when
+ ``a.shape[0]`` is 2, ``minimum(a[0], a[1])`` is faster than
``amin(a, axis=0)``.
Examples
@@ -2913,4 +2913,3 @@ def var(a, axis=None, dtype=None, out=None, ddof=0,
return _methods._var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
keepdims=keepdims)
-
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py
index 686425623..f198ab3b8 100644
--- a/numpy/core/function_base.py
+++ b/numpy/core/function_base.py
@@ -166,4 +166,3 @@ def logspace(start,stop,num=50,endpoint=True,base=10.0):
"""
y = linspace(start,stop,num=num,endpoint=endpoint)
return _nx.power(base,y)
-
diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h
index e5fd09e91..62ffa4006 100644
--- a/numpy/core/include/numpy/npy_common.h
+++ b/numpy/core/include/numpy/npy_common.h
@@ -952,4 +952,3 @@ typedef npy_int64 npy_datetime;
/* End of typedefs for numarray style bit-width names */
#endif
-
diff --git a/numpy/core/shape_base.py b/numpy/core/shape_base.py
index ee0b1342e..3671033e9 100644
--- a/numpy/core/shape_base.py
+++ b/numpy/core/shape_base.py
@@ -275,4 +275,3 @@ def hstack(tup):
return _nx.concatenate(arrs, 0)
else:
return _nx.concatenate(arrs, 1)
-
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 6db6060c9..86a6b0137 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -77,7 +77,7 @@ PyArray_Size(PyObject *op)
* Returns 0 on success, -1 on failure.
*/
NPY_NO_EXPORT int
-PyArray_SetUpdateIfCopyBase(PyArrayObject *arr, PyArrayObject *base)
+PyArray_SetUpdateIfCopyBase(PyArrayObject *arr, PyArrayObject *base)
{
if (base == NULL) {
PyErr_SetString(PyExc_ValueError,
@@ -92,7 +92,7 @@ PyArray_SetUpdateIfCopyBase(PyArrayObject *arr, PyArrayObject *base)
if (PyArray_FailUnlessWriteable(base, "UPDATEIFCOPY base") < 0) {
goto fail;
}
-
+
/*
* Any writes to 'arr' will magicaly turn into writes to 'base', so we
* should warn if necessary.
@@ -145,8 +145,8 @@ PyArray_SetBaseObject(PyArrayObject *arr, PyObject *obj)
/*
* Don't allow infinite chains of views, always set the base
- * to the first owner of the data.
- * That is, either the first object which isn't an array,
+ * to the first owner of the data.
+ * That is, either the first object which isn't an array,
* or the first object which owns its own data.
*/
@@ -157,19 +157,19 @@ PyArray_SetBaseObject(PyArrayObject *arr, PyObject *obj)
/* Propagate WARN_ON_WRITE through views. */
if (PyArray_FLAGS(obj_arr) & NPY_ARRAY_WARN_ON_WRITE) {
PyArray_ENABLEFLAGS(arr, NPY_ARRAY_WARN_ON_WRITE);
- }
+ }
/* If this array owns its own data, stop collapsing */
if (PyArray_CHKFLAGS(obj_arr, NPY_ARRAY_OWNDATA)) {
break;
- }
+ }
tmp = PyArray_BASE(obj_arr);
/* If there's no base, stop collapsing */
if (tmp == NULL) {
break;
}
- /* Stop the collapse new base when the would not be of the same
+ /* Stop the collapse new base when the would not be of the same
* type (i.e. different subclass).
*/
if (Py_TYPE(tmp) != Py_TYPE(arr)) {
@@ -1478,7 +1478,7 @@ PyArray_CheckStrides(int elsize, int nd, npy_intp numbytes, npy_intp offset,
offset_bounds_from_strides(elsize, nd, dims, newstrides,
&lower_offset, &upper_offset);
-
+
if ((upper_offset > end) || (lower_offset < begin)) {
return NPY_FALSE;
}
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c
index 4c374cc75..5a7a58b33 100644
--- a/numpy/core/src/multiarray/common.c
+++ b/numpy/core/src/multiarray/common.c
@@ -108,7 +108,7 @@ _array_find_python_scalar_type(PyObject *op)
}
}
else if (PyLong_Check(op)) {
- /* check to see if integer can fit into a longlong or ulonglong
+ /* check to see if integer can fit into a longlong or ulonglong
and return that --- otherwise return object */
if ((PyLong_AsLongLong(op) == -1) && PyErr_Occurred()) {
PyErr_Clear();
@@ -117,14 +117,14 @@ _array_find_python_scalar_type(PyObject *op)
return PyArray_DescrFromType(NPY_LONGLONG);
}
- if ((PyLong_AsUnsignedLongLong(op) == (unsigned long long) -1)
+ if ((PyLong_AsUnsignedLongLong(op) == (unsigned long long) -1)
&& PyErr_Occurred()){
PyErr_Clear();
- }
+ }
else {
return PyArray_DescrFromType(NPY_ULONGLONG);
- }
-
+ }
+
return PyArray_DescrFromType(NPY_OBJECT);
}
return NULL;
@@ -381,7 +381,7 @@ PyArray_DTypeFromObjectHelper(PyObject *obj, int maxdims,
if (PyObject_GetBuffer(obj, &buffer_view,
PyBUF_FORMAT|PyBUF_STRIDES) == 0 ||
PyObject_GetBuffer(obj, &buffer_view, PyBUF_FORMAT) == 0) {
-
+
PyErr_Clear();
dtype = _descriptor_from_pep3118_format(buffer_view.format);
PyBuffer_Release(&buffer_view);
@@ -391,7 +391,7 @@ PyArray_DTypeFromObjectHelper(PyObject *obj, int maxdims,
}
else if (PyObject_GetBuffer(obj, &buffer_view, PyBUF_STRIDES) == 0 ||
PyObject_GetBuffer(obj, &buffer_view, PyBUF_SIMPLE) == 0) {
-
+
PyErr_Clear();
dtype = PyArray_DescrNewFromType(NPY_VOID);
dtype->elsize = buffer_view.itemsize;
diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h
index 82b66123c..9df644210 100644
--- a/numpy/core/src/multiarray/common.h
+++ b/numpy/core/src/multiarray/common.h
@@ -39,7 +39,7 @@ _array_find_python_scalar_type(PyObject *op);
NPY_NO_EXPORT PyArray_Descr *
_array_typedescr_fromstr(char *str);
-/*
+/*
* Returns -1 and sets an exception if *index is an invalid index for
* an array of size max_item, otherwise adjusts it in place to be
* 0 <= *index < max_item, and returns 0.
diff --git a/numpy/core/src/multiarray/conversion_utils.c b/numpy/core/src/multiarray/conversion_utils.c
index 8ce7bb74d..9450766ab 100644
--- a/numpy/core/src/multiarray/conversion_utils.c
+++ b/numpy/core/src/multiarray/conversion_utils.c
@@ -802,7 +802,7 @@ PyArray_PyIntAsIntp(PyObject *o)
PyErr_Clear();
}
- /*
+ /*
* For backward compatibility check the number C-Api number protcol
* This should be removed up the finish label after deprecation.
*/
@@ -1127,7 +1127,7 @@ PyArray_TypestrConvert(int itemsize, int gentype)
}
break;
}
-
+
/*
* Raise deprecate warning if new type hasn't been
* set yet and size char is invalid.
diff --git a/numpy/core/src/multiarray/convert_datatype.c b/numpy/core/src/multiarray/convert_datatype.c
index 19ba5d327..e327db024 100644
--- a/numpy/core/src/multiarray/convert_datatype.c
+++ b/numpy/core/src/multiarray/convert_datatype.c
@@ -738,9 +738,9 @@ can_cast_scalar_to(PyArray_Descr *scal_type, char *scal_data,
/* An aligned memory buffer large enough to hold any type */
npy_longlong value[4];
- /*
- * If the two dtypes are actually references to the same object
- * or if casting type is forced unsafe then always OK.
+ /*
+ * If the two dtypes are actually references to the same object
+ * or if casting type is forced unsafe then always OK.
*/
if (scal_type == to || casting == NPY_UNSAFE_CASTING ) {
return 1;
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index 9e84d9a32..07de463f7 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -1805,8 +1805,8 @@ PyArray_FromArray(PyArrayObject *arr, PyArray_Descr *newtype, int flags)
oldtype = PyArray_DESCR(arr);
if (newtype == NULL) {
- /*
- * Check if object is of array with Null newtype.
+ /*
+ * Check if object is of array with Null newtype.
* If so return it directly instead of checking for casting.
*/
if (flags == 0) {
diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c
index 3923709ed..aeff950c6 100644
--- a/numpy/core/src/multiarray/dtype_transfer.c
+++ b/numpy/core/src/multiarray/dtype_transfer.c
@@ -4245,4 +4245,3 @@ PyArray_PrepareThreeRawArrayIter(int ndim, npy_intp *shape,
*out_ndim = ndim;
return 0;
}
-
diff --git a/numpy/core/src/multiarray/flagsobject.c b/numpy/core/src/multiarray/flagsobject.c
index 6e06103a8..7f56ddb03 100644
--- a/numpy/core/src/multiarray/flagsobject.c
+++ b/numpy/core/src/multiarray/flagsobject.c
@@ -100,7 +100,7 @@ PyArray_UpdateFlags(PyArrayObject *ret, int flagmask)
*
* strides[0] == itemsize
* strides[i] == shape[i - 1] * strides[i - 1]
- *
+ *
* According to these rules, a 0- or 1-dimensional array is either both
* C- and F-contiguous, or neither; and an array with 2+ dimensions
* can be C- or F- contiguous, or neither, but not both. Though there
diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c
index 4fbdd5e54..b7fed6de7 100644
--- a/numpy/core/src/multiarray/iterators.c
+++ b/numpy/core/src/multiarray/iterators.c
@@ -975,8 +975,8 @@ iter_ass_subscript(PyArrayIterObject *self, PyObject *ind, PyObject *val)
"Cannot delete iterator elements");
return -1;
}
-
- if (PyArray_FailUnlessWriteable(self->ao, "underlying array") < 0)
+
+ if (PyArray_FailUnlessWriteable(self->ao, "underlying array") < 0)
return -1;
if (ind == Py_Ellipsis) {
@@ -1158,9 +1158,9 @@ iter_array(PyArrayIterObject *it, PyObject *NPY_UNUSED(op))
* 2) underlying array is not contiguous
* -- make new 1-d contiguous array with updateifcopy flag set
* to copy back to the old array
- *
+ *
* If underlying array is readonly, then we make the output array readonly
- * and updateifcopy does not apply.
+ * and updateifcopy does not apply.
*/
size = PyArray_SIZE(it->ao);
Py_INCREF(PyArray_DESCR(it->ao));
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index 22a4d8c97..3cdde9afe 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -987,7 +987,7 @@ array_subscript_fancy(PyArrayObject *self, PyObject *op, int fancy)
int oned;
PyObject *other;
PyArrayMapIterObject *mit;
-
+
oned = ((PyArray_NDIM(self) == 1) &&
!(PyTuple_Check(op) && PyTuple_GET_SIZE(op) > 1));
@@ -1030,7 +1030,7 @@ array_subscript_fromobject(PyArrayObject *self, PyObject *op)
{
int fancy;
npy_intp vals[NPY_MAXDIMS];
-
+
/* Integer index */
if (PyArray_IsIntegerScalar(op) || (PyIndex_Check(op) &&
!PySequence_Check(op))) {
@@ -1212,7 +1212,7 @@ array_subscript(PyArrayObject *self, PyObject *op)
"0-dimensional arrays can't be indexed");
return NULL;
}
-
+
else {
fancy = fancy_indexing_check(op);
if (fancy != SOBJ_NOTFANCY) {
@@ -1226,8 +1226,8 @@ array_subscript(PyArrayObject *self, PyObject *op)
if (ret == NULL) {
return NULL;
}
-
- if (PyArray_Check(ret) && PyArray_NDIM((PyArrayObject *)ret) == 0
+
+ if (PyArray_Check(ret) && PyArray_NDIM((PyArrayObject *)ret) == 0
&& !_check_ellipses(op)) {
return PyArray_Return((PyArrayObject *)ret);
}
@@ -2002,7 +2002,7 @@ PyArray_MapIterNew(PyObject *indexobj, int oned, int fancy)
*/
/* convert all inputs to iterators */
- if (PyArray_Check(indexobj) && PyArray_ISBOOL(indexobj)
+ if (PyArray_Check(indexobj) && PyArray_ISBOOL(indexobj)
&& !PyArray_IsZeroDim(indexobj)) {
mit->numiter = _nonzero_indices(indexobj, mit->iters);
if (mit->numiter < 0) {
@@ -2124,10 +2124,10 @@ PyArray_MapIterArray(PyArrayObject * a, PyObject * index)
int fancy = fancy_indexing_check(index);
/*
- * MapIterNew supports a special mode that allows more efficient 1-d iteration,
- * but clients that want to make use of this need to use a different API just
+ * MapIterNew supports a special mode that allows more efficient 1-d iteration,
+ * but clients that want to make use of this need to use a different API just
* for the one-d cases. For the public interface this is confusing, so we
- * unconditionally disable the 1-d optimized mode, and use the generic
+ * unconditionally disable the 1-d optimized mode, and use the generic
* implementation in all cases.
*/
int oned = 0;
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index e4858eef7..45e322973 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -1992,7 +1992,7 @@ array_dot(PyArrayObject *self, PyObject *args, PyObject *kwds)
static PyObject *numpycore = NULL;
char * kwords[] = {"b", "out", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O", kwords, &b, &out)) {
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O", kwords, &b, &out)) {
return NULL;
}
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c
index dd1f3c7d7..9fe406c72 100644
--- a/numpy/core/src/multiarray/multiarraymodule.c
+++ b/numpy/core/src/multiarray/multiarraymodule.c
@@ -488,7 +488,7 @@ PyArray_ConcatenateFlattenedArrays(int narrays, PyArrayObject **arrays,
for (iarrays = 0; iarrays < narrays; ++iarrays) {
shape += sizes[iarrays] = PyArray_SIZE(arrays[iarrays]);
/* Check for overflow */
- if (shape < 0) {
+ if (shape < 0) {
PyErr_SetString(PyExc_ValueError,
"total number of elements "
"too large to concatenate");
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index f9b35deed..f64b7e9f7 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -3051,7 +3051,7 @@ void_arrtype_hash(PyObject *obj)
/* Cannot hash mutable void scalars */
if (p->flags & NPY_ARRAY_WRITEABLE) {
PyErr_SetString(PyExc_TypeError, "unhashable type: 'writeable void-scalar'");
- return -1;
+ return -1;
}
len = voidtype_length(p);
for (n=0; n < len; n++) {
diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c
index 67ee4b04b..41c670df4 100644
--- a/numpy/core/src/multiarray/shape.c
+++ b/numpy/core/src/multiarray/shape.c
@@ -361,7 +361,7 @@ _attempt_nocopy_reshape(PyArrayObject *self, int newnd, npy_intp* newdims,
int oi, oj, ok, ni, nj, nk;
oldnd = 0;
- /*
+ /*
* Remove axes with dimension 1 from the old array. They have no effect
* but would need special cases since their strides do not matter.
*/
diff --git a/numpy/core/src/npymath/halffloat.c b/numpy/core/src/npymath/halffloat.c
index 883830795..34ac64287 100644
--- a/numpy/core/src/npymath/halffloat.c
+++ b/numpy/core/src/npymath/halffloat.c
@@ -527,4 +527,3 @@ npy_uint64 npy_halfbits_to_doublebits(npy_uint16 h)
return d_sgn + (((npy_uint64)(h&0x7fffu) + 0xfc000u) << 42);
}
}
-
diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src
index 90bbf5fb6..2aba8be8f 100644
--- a/numpy/core/src/npymath/ieee754.c.src
+++ b/numpy/core/src/npymath/ieee754.c.src
@@ -21,7 +21,7 @@ double npy_copysign(double x, double y)
/*
The below code is provided for compilers which do not yet provide C11 compatibility (gcc 4.5 and older)
*/
-#ifndef LDBL_TRUE_MIN
+#ifndef LDBL_TRUE_MIN
#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
#endif
@@ -678,4 +678,3 @@ void npy_set_floatstatus_invalid(void)
}
#endif
-
diff --git a/numpy/core/src/npysort/selection.c.src b/numpy/core/src/npysort/selection.c.src
index a41aa87f1..b11753367 100644
--- a/numpy/core/src/npysort/selection.c.src
+++ b/numpy/core/src/npysort/selection.c.src
@@ -1,7 +1,7 @@
/* -*- c -*- */
/*
- *
+ *
* The code is loosely based on the quickselect from
* Nicolas Devillard - 1998 public domain
* http://ndevilla.free.fr/median/median/
diff --git a/numpy/core/src/private/npy_partition.h b/numpy/core/src/private/npy_partition.h
index 9e1c8494a..f2b684d3a 100644
--- a/numpy/core/src/private/npy_partition.h
+++ b/numpy/core/src/private/npy_partition.h
@@ -556,4 +556,3 @@ get_argpartition_func(int type, NPY_SELECTKIND which)
}
#endif
-
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index 307c7ddb0..d789a3dd4 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -500,7 +500,7 @@ half_ctype_remainder(npy_half a, npy_half b, npy_half *out) {
static npy_@name@ (*_basic_@name@_pow)(@type@ a, @type@ b);
static void
-@name@_ctype_power(@type@ a, @type@ b, @type@ *out)
+@name@_ctype_power(@type@ a, @type@ b, @type@ *out)
{
*out = _basic_@name@_pow(a, b);
}
diff --git a/numpy/core/src/umath/loops.h b/numpy/core/src/umath/loops.h
index 7f49f1956..62890f370 100644
--- a/numpy/core/src/umath/loops.h
+++ b/numpy/core/src/umath/loops.h
@@ -2726,4 +2726,3 @@ OBJECT_sign(char **args, npy_intp *dimensions, npy_intp *steps, void *NPY_UNUSED
*/
#endif
-
diff --git a/numpy/core/src/umath/operand_flag_tests.c.src b/numpy/core/src/umath/operand_flag_tests.c.src
index 7eaf1fbfc..4fb428bfc 100644
--- a/numpy/core/src/umath/operand_flag_tests.c.src
+++ b/numpy/core/src/umath/operand_flag_tests.c.src
@@ -79,7 +79,7 @@ PyMODINIT_FUNC initoperand_flag_tests(void)
PyUFunc_None, "inplace_add",
"inplace_add_docstring", 0);
- /*
+ /*
* Set flags to turn off buffering for first input operand,
* so that result can be written back to input operand.
*/
diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c
index 3f2b94a4a..bb4c0f44e 100644
--- a/numpy/core/src/umath/reduction.c
+++ b/numpy/core/src/umath/reduction.c
@@ -250,7 +250,7 @@ check_nonreorderable_axes(int ndim, npy_bool *axis_flags, const char *funcname)
* PyArray_AssignOne(result, NULL, NULL), because this function raises an
* exception when there are no elements to reduce (which appropriate iff the
* reduction operation has no identity).
- *
+ *
* This means it copies the subarray indexed at zero along each reduction axis
* into 'result', then returns a view into 'operand' excluding those copied
* elements.
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c
index 6a16692b0..36dbf6569 100644
--- a/numpy/core/src/umath/ufunc_type_resolution.c
+++ b/numpy/core/src/umath/ufunc_type_resolution.c
@@ -1613,7 +1613,7 @@ linear_search_userloop_type_resolver(PyUFuncObject *self,
for (i = 0; i < nop; ++i) {
int type_num;
-
+
/* no more ufunc arguments to check */
if (op[i] == NULL) {
break;
@@ -2129,5 +2129,3 @@ type_tuple_type_resolver(PyUFuncObject *self,
return -1;
}
-
-
diff --git a/numpy/core/tests/test_api.py b/numpy/core/tests/test_api.py
index 653b2eeb9..e8dacba2e 100644
--- a/numpy/core/tests/test_api.py
+++ b/numpy/core/tests/test_api.py
@@ -268,7 +268,7 @@ def test_array_astype():
assert_array_equal(a, np.array(b'1234567890' * 3, dtype='S30'))
a = np.array([123456789012345678901234567890], dtype='O').astype('U')
assert_array_equal(a, np.array(sixu('1234567890' * 3), dtype='U30'))
-
+
a = np.array(123456789012345678901234567890, dtype='S')
assert_array_equal(a, np.array(b'1234567890' * 3, dtype='S30'))
a = np.array(123456789012345678901234567890, dtype='U')
diff --git a/numpy/core/tests/test_dtype.py b/numpy/core/tests/test_dtype.py
index 7493c20e2..fed7375b7 100644
--- a/numpy/core/tests/test_dtype.py
+++ b/numpy/core/tests/test_dtype.py
@@ -50,8 +50,8 @@ class TestBuiltin(TestCase):
def test_invalid_types(self):
# Make sure invalid type strings raise a warning.
- # For now, display a deprecation warning for invalid
- # type sizes. In the future this should be changed
+ # For now, display a deprecation warning for invalid
+ # type sizes. In the future this should be changed
# to an exception.
assert_warns(DeprecationWarning, np.dtype, 'O3')
diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py
index 5de733d4c..6f239a979 100644
--- a/numpy/core/tests/test_function_base.py
+++ b/numpy/core/tests/test_function_base.py
@@ -35,4 +35,3 @@ class TestLinspace(TestCase):
t3 = linspace(0,1,2).dtype
assert_equal(t1, t2)
assert_equal(t2, t3)
-
diff --git a/numpy/core/tests/test_item_selection.py b/numpy/core/tests/test_item_selection.py
index 425b1d893..9954e1e0f 100644
--- a/numpy/core/tests/test_item_selection.py
+++ b/numpy/core/tests/test_item_selection.py
@@ -59,7 +59,7 @@ class TestTake(TestCase):
a.take(b, out=a[:6])
del a
assert_(all(sys.getrefcount(o) == 3 for o in objects))
-
+
if __name__ == "__main__":
run_module_suite()
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index cdb278dfc..40847aab8 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -1314,11 +1314,11 @@ class TestMethods(TestCase):
assert_equal(np.dot(a, b), a.dot(b))
assert_equal(np.dot(np.dot(a, b), c), a.dot(b).dot(c))
- # test passing in an output array
+ # test passing in an output array
c = np.zeros_like(a)
a.dot(b,c)
assert_equal(c, np.dot(a,b))
-
+
# test keyword args
c = np.zeros_like(a)
a.dot(b=b,out=c)
diff --git a/numpy/core/tests/test_shape_base.py b/numpy/core/tests/test_shape_base.py
index 8cbcfede3..921cfaf1c 100644
--- a/numpy/core/tests/test_shape_base.py
+++ b/numpy/core/tests/test_shape_base.py
@@ -183,7 +183,7 @@ def test_concatenate_axis_None():
assert_equal(r.size, a.size + len(b))
assert_equal(r.dtype, a.dtype)
r = np.concatenate((a, b, c), axis=None)
- d = array(['0', '1', '2', '3',
+ d = array(['0', '1', '2', '3',
'0', '1', '2', 'x'])
assert_array_equal(r,d)
diff --git a/numpy/core/tests/test_ufunc.py b/numpy/core/tests/test_ufunc.py
index 2368e5809..42a8e1609 100644
--- a/numpy/core/tests/test_ufunc.py
+++ b/numpy/core/tests/test_ufunc.py
@@ -801,7 +801,7 @@ class TestUfunc(TestCase):
# no output type should raise TypeError
assert_raises(TypeError, test_add, a, b)
-
+
def test_operand_flags(self):
a = np.arange(16, dtype='l').reshape(4,4)
b = np.arange(9, dtype='l').reshape(3,3)
@@ -814,7 +814,7 @@ class TestUfunc(TestCase):
assert_equal(a, 3)
opflag_tests.inplace_add(a, [3, 4])
assert_equal(a, 10)
-
+
def test_struct_ufunc(self):
import numpy.core.struct_ufunc_test as struct_ufunc
@@ -885,12 +885,12 @@ class TestUfunc(TestCase):
b = np.array([100,200,300])
np.add.at(a, (slice(None), slice(None), [1,2,1]), b)
assert_equal(a,
- [[[0,401,202],
- [3,404,205],
+ [[[0,401,202],
+ [3,404,205],
[6,407,208]],
-
- [[9, 410,211],
- [12,413,214],
+
+ [[9, 410,211],
+ [12,413,214],
[15,416,217]],
[[18,419,220],
@@ -906,12 +906,12 @@ class TestUfunc(TestCase):
b = np.array([100,200,300])
np.add.at(a, (slice(None), [1,2,1], slice(None)), b)
assert_equal(a,
- [[[0, 1, 2 ],
- [203,404,605],
+ [[[0, 1, 2 ],
+ [203,404,605],
[106,207,308]],
-
- [[9, 10, 11 ],
- [212,413,614],
+
+ [[9, 10, 11 ],
+ [212,413,614],
[115,216,317]],
[[18, 19, 20 ],
@@ -927,12 +927,12 @@ class TestUfunc(TestCase):
b = np.array([100,200,300])
np.add.at(a, ([1,2,1], 0, slice(None)), b)
assert_equal(a,
- [[[0, 1, 2],
- [3, 4, 5],
+ [[[0, 1, 2],
+ [3, 4, 5],
[6, 7, 8]],
-
- [[209,410,611],
- [12, 13, 14],
+
+ [[209,410,611],
+ [12, 13, 14],
[15, 16, 17]],
[[118,219,320],
@@ -943,12 +943,12 @@ class TestUfunc(TestCase):
b = np.array([100,200,300])
np.add.at(a, (slice(None), slice(None), slice(None)), b)
assert_equal(a,
- [[[100,201,302],
- [103,204,305],
+ [[[100,201,302],
+ [103,204,305],
[106,207,308]],
-
- [[109,210,311],
- [112,213,314],
+
+ [[109,210,311],
+ [112,213,314],
[115,216,317]],
[[118,219,320],
diff --git a/numpy/distutils/command/build_clib.py b/numpy/distutils/command/build_clib.py
index 8b150d800..ab40a71ea 100644
--- a/numpy/distutils/command/build_clib.py
+++ b/numpy/distutils/command/build_clib.py
@@ -104,7 +104,7 @@ class build_clib(old_build_clib):
if self.inplace:
for l in self.distribution.installed_libraries:
- libname = self.compiler.library_filename(l.name)
+ libname = self.compiler.library_filename(l.name)
source = os.path.join(self.build_clib, libname)
target = os.path.join(l.target_dir, libname)
self.mkpath(l.target_dir)
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index fd8a135fb..3434dffee 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -152,7 +152,7 @@ class was %s
def check_header(self, header, include_dirs=None, library_dirs=None, lang='c'):
self._check_compiler()
return self.try_compile(
- "/* we need a dummy line to make distutils happy */",
+ "/* we need a dummy line to make distutils happy */",
[header], include_dirs)
def check_decl(self, symbol,
diff --git a/numpy/distutils/conv_template.py b/numpy/distutils/conv_template.py
index cb03fc7c3..3f2e1297d 100644
--- a/numpy/distutils/conv_template.py
+++ b/numpy/distutils/conv_template.py
@@ -193,14 +193,14 @@ def parse_loop_header(loophead) :
# Find any exclude variables
excludes = []
-
+
for obj in exclude_re.finditer(loophead):
span = obj.span()
# find next newline
endline = loophead.find('\n', span[1])
substr = loophead[span[1]:endline]
ex_names = exclude_vars_re.findall(substr)
- excludes.append(dict(ex_names))
+ excludes.append(dict(ex_names))
# generate list of dictionaries, one for each template iteration
dlist = []
diff --git a/numpy/distutils/extension.py b/numpy/distutils/extension.py
index 7fc6e1ae7..d0182eb14 100644
--- a/numpy/distutils/extension.py
+++ b/numpy/distutils/extension.py
@@ -72,7 +72,7 @@ class Extension(old_Extension):
self.module_dirs = module_dirs or []
self.extra_f77_compile_args = extra_f77_compile_args or []
self.extra_f90_compile_args = extra_f90_compile_args or []
-
+
return
def has_cxx_sources(self):
diff --git a/numpy/doc/basics.py b/numpy/doc/basics.py
index 75f0995d8..86a3984c2 100644
--- a/numpy/doc/basics.py
+++ b/numpy/doc/basics.py
@@ -144,4 +144,3 @@ methods arrays do.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/broadcasting.py b/numpy/doc/broadcasting.py
index 3826a70b3..43b725b83 100644
--- a/numpy/doc/broadcasting.py
+++ b/numpy/doc/broadcasting.py
@@ -176,4 +176,3 @@ for illustrations of broadcasting concepts.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/byteswapping.py b/numpy/doc/byteswapping.py
index 7baa648a1..8632e9794 100644
--- a/numpy/doc/byteswapping.py
+++ b/numpy/doc/byteswapping.py
@@ -136,4 +136,3 @@ False
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/creation.py b/numpy/doc/creation.py
index e00c26e54..7979b51aa 100644
--- a/numpy/doc/creation.py
+++ b/numpy/doc/creation.py
@@ -142,4 +142,3 @@ diagonal).
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/glossary.py b/numpy/doc/glossary.py
index b9053cc07..3770f5761 100644
--- a/numpy/doc/glossary.py
+++ b/numpy/doc/glossary.py
@@ -416,4 +416,3 @@ Glossary
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/howtofind.py b/numpy/doc/howtofind.py
index 89f8ac9b9..e080d263a 100644
--- a/numpy/doc/howtofind.py
+++ b/numpy/doc/howtofind.py
@@ -8,4 +8,3 @@ How to find things in NumPy.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/indexing.py b/numpy/doc/indexing.py
index 997aee1b7..0439a7a76 100644
--- a/numpy/doc/indexing.py
+++ b/numpy/doc/indexing.py
@@ -406,4 +406,3 @@ converted to an array as a list would be. As an example: ::
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/internals.py b/numpy/doc/internals.py
index 73ec51332..6bd6b1ae9 100644
--- a/numpy/doc/internals.py
+++ b/numpy/doc/internals.py
@@ -161,4 +161,3 @@ it is more in line with Python semantics and the natural order of the data.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/io.py b/numpy/doc/io.py
index aeffdaca0..e45bfc9b3 100644
--- a/numpy/doc/io.py
+++ b/numpy/doc/io.py
@@ -8,4 +8,3 @@ Placeholder for array I/O documentation.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/jargon.py b/numpy/doc/jargon.py
index 56b25ad7a..3fcbc7d23 100644
--- a/numpy/doc/jargon.py
+++ b/numpy/doc/jargon.py
@@ -8,4 +8,3 @@ Placeholder for computer science, engineering and other jargon.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/methods_vs_functions.py b/numpy/doc/methods_vs_functions.py
index 89c26b841..4149000bc 100644
--- a/numpy/doc/methods_vs_functions.py
+++ b/numpy/doc/methods_vs_functions.py
@@ -8,4 +8,3 @@ Placeholder for Methods vs. Functions documentation.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/misc.py b/numpy/doc/misc.py
index 79c16a56e..311e6e0c8 100644
--- a/numpy/doc/misc.py
+++ b/numpy/doc/misc.py
@@ -227,4 +227,3 @@ Interfacing to C++:
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/performance.py b/numpy/doc/performance.py
index 6b0b55042..b0c158bf3 100644
--- a/numpy/doc/performance.py
+++ b/numpy/doc/performance.py
@@ -8,4 +8,3 @@ Placeholder for Improving Performance documentation.
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py
index 304184d0d..0444bdf90 100644
--- a/numpy/doc/structured_arrays.py
+++ b/numpy/doc/structured_arrays.py
@@ -194,7 +194,7 @@ Notice that `x` is created with a list of tuples. ::
The fields are returned in the order they are asked for.::
>>> x[['y','x']]
- array([(2.5, 1.5), (4.0, 3.0), (3.0, 1.0)],
+ array([(2.5, 1.5), (4.0, 3.0), (3.0, 1.0)],
dtype=[('y', '<f4'), ('x', '<f4')])
Filling structured arrays
@@ -221,4 +221,3 @@ You can find some more information on recarrays and structured arrays
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/subclassing.py b/numpy/doc/subclassing.py
index 31bf6e211..a62fc2d6d 100644
--- a/numpy/doc/subclassing.py
+++ b/numpy/doc/subclassing.py
@@ -558,4 +558,3 @@ how this can work, have a look at the ``memmap`` class in
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/doc/ufuncs.py b/numpy/doc/ufuncs.py
index 0b94e0537..0132202ad 100644
--- a/numpy/doc/ufuncs.py
+++ b/numpy/doc/ufuncs.py
@@ -136,4 +136,3 @@ results in an error. There are two alternatives:
"""
from __future__ import division, absolute_import, print_function
-
diff --git a/numpy/f2py/NEWS.txt b/numpy/f2py/NEWS.txt
index a4a254405..c36bd49b5 100644
--- a/numpy/f2py/NEWS.txt
+++ b/numpy/f2py/NEWS.txt
@@ -1,2 +1,2 @@
-Read docs/HISTORY.txt \ No newline at end of file
+Read docs/HISTORY.txt
diff --git a/numpy/f2py/TODO.txt b/numpy/f2py/TODO.txt
index 093f0119e..a883f75d0 100644
--- a/numpy/f2py/TODO.txt
+++ b/numpy/f2py/TODO.txt
@@ -26,7 +26,7 @@ subroutine fun
end subroutine fun
=========================================================================
-Users Guide needs major revision.
+Users Guide needs major revision.
[DONE]
=========================================================================
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 2ee8eb9a1..8b455c8ad 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -721,7 +721,7 @@ def _is_intent_callback(vdecl):
def _resolvenameargspattern(line):
line = markouterparen(line)
m1=nameargspattern.match(line)
- if m1:
+ if m1:
return m1.group('name'),m1.group('args'),m1.group('result'), m1.group('bind')
m1=callnameargspattern.match(line)
if m1:
diff --git a/numpy/f2py/doc/Release-2.x.txt b/numpy/f2py/doc/Release-2.x.txt
index 807eb0ca8..2085cb1be 100644
--- a/numpy/f2py/doc/Release-2.x.txt
+++ b/numpy/f2py/doc/Release-2.x.txt
@@ -14,13 +14,13 @@ C expertise is required for using this tool.
Features include:
*** All basic Fortran types are supported:
- integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
+ integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
character[ | *(*) | *1 | *2 | *3 | ... ]
real[ | *4 | *8 | *16 ], double precision,
complex[ | *8 | *16 | *32 ]
*** Multi-dimensional arrays of (almost) all basic types.
- Dimension specifications:
+ Dimension specifications:
<dim> | <start>:<end> | * | :
*** Supported attributes:
@@ -63,7 +63,7 @@ Features include:
*** f2py users list is available for support, feedback, etc.
-More information about f2py, see
+More information about f2py, see
http://cens.ioc.ee/projects/f2py2e/
diff --git a/numpy/f2py/doc/Release-3.x.txt b/numpy/f2py/doc/Release-3.x.txt
index 940771015..ddb93b9fd 100644
--- a/numpy/f2py/doc/Release-3.x.txt
+++ b/numpy/f2py/doc/Release-3.x.txt
@@ -14,13 +14,13 @@ C expertise is required for using this tool.
Features include:
*** All basic Fortran types are supported:
- integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
+ integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
character[ | *(*) | *1 | *2 | *3 | ... ]
real[ | *4 | *8 | *16 ], double precision,
complex[ | *8 | *16 | *32 ]
*** Multi-dimensional arrays of (almost) all basic types.
- Dimension specifications:
+ Dimension specifications:
<dim> | <start>:<end> | * | :
*** Supported attributes and statements:
@@ -33,7 +33,7 @@ Features include:
NEW: intent(c), threadsafe, fortranname
*** Calling Fortran 77/90/95 subroutines and functions. Also
- Fortran 90/95 module subroutines are supported. Internal
+ Fortran 90/95 module subroutines are supported. Internal
initialization of optional arguments.
*** Accessing COMMON blocks from Python.
@@ -55,7 +55,7 @@ NEW: Accessing Fortran 90/95 module data.
dependencies, etc.
NEW: * Automatically generates setup_<modulename>.py for building
- extension modules using tools from distutils and
+ extension modules using tools from distutils and
fortran_support module (SciPy).
*** Automatically generates Makefile for compiling Fortran and C
@@ -72,7 +72,7 @@ NEW: * Installation with distutils.
*** And finally, many bugs are fixed.
-More information about f2py, see
+More information about f2py, see
http://cens.ioc.ee/projects/f2py2e/
diff --git a/numpy/f2py/doc/Release-4.x.txt b/numpy/f2py/doc/Release-4.x.txt
index ed071a0cb..d490dcb7a 100644
--- a/numpy/f2py/doc/Release-4.x.txt
+++ b/numpy/f2py/doc/Release-4.x.txt
@@ -18,13 +18,13 @@ New features:
Features include:
*** All basic Fortran types are supported:
- integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
+ integer[ | *1 | *2 | *4 | *8 ], logical[ | *1 | *2 | *4 | *8 ],
character[ | *(*) | *1 | *2 | *3 | ... ]
real[ | *4 | *8 | *16 ], double precision,
complex[ | *8 | *16 | *32 ]
*** Multi-dimensional arrays of (almost) all basic types.
- Dimension specifications:
+ Dimension specifications:
<dim> | <start>:<end> | * | :
*** Supported attributes and statements:
@@ -37,7 +37,7 @@ Features include:
intent(c), threadsafe, fortranname
*** Calling Fortran 77/90/95 subroutines and functions. Also
- Fortran 90/95 module subroutines are supported. Internal
+ Fortran 90/95 module subroutines are supported. Internal
initialization of optional arguments.
*** Accessing COMMON blocks from Python.
@@ -59,7 +59,7 @@ Features include:
dependencies, etc.
*** Automatically generates setup_<modulename>.py for building
- extension modules using tools from distutils and
+ extension modules using tools from distutils and
fortran_support module (SciPy).
*** Automatically generates Makefile for compiling Fortran and C
@@ -76,7 +76,7 @@ Features include:
*** And finally, many bugs are fixed.
-More information about f2py, see
+More information about f2py, see
http://cens.ioc.ee/projects/f2py2e/
diff --git a/numpy/f2py/doc/f2python9-final/README.txt b/numpy/f2py/doc/f2python9-final/README.txt
index b907216b6..2ce8e393a 100644
--- a/numpy/f2py/doc/f2python9-final/README.txt
+++ b/numpy/f2py/doc/f2python9-final/README.txt
@@ -23,9 +23,9 @@ Note that this file includes the following JPG images
PS:
The HTML file f2python9.html is generated using TTH (http://hutchinson.belmont.ma.us/tth/)
-from the LaTeX source file `python9.tex'. The source can be found in the
+from the LaTeX source file `python9.tex'. The source can be found in the
src/
-directory. This directory contains also the following EPS files
+directory. This directory contains also the following EPS files
flow.eps
structure.eps
aerostructure.eps
diff --git a/numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt b/numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt
index ae1545718..d4188a91b 100644
--- a/numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt
+++ b/numpy/f2py/doc/f2python9-final/src/examples/exp1mess.txt
@@ -13,5 +13,5 @@ Building modules...
l,u = exp1([n])
Wrote C/API module "foo" to file "foomodule.c"
Documentation is saved to file "foomodule.tex"
-Run GNU make to build shared modules:
+Run GNU make to build shared modules:
gmake -f Makefile-<modulename> [test]
diff --git a/numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt b/numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt
index 9bec9198e..5ae75ebd1 100644
--- a/numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt
+++ b/numpy/f2py/doc/f2python9-final/src/examples/exp1session.txt
@@ -17,4 +17,4 @@ Return objects:
>>> print l,u
[ 517656. 190435.] [ 566827. 208524.]
>>> print l[0]/l[1], u[0]/u[1]-l[0]/l[1]
-2.71828182845 1.36437527942e-11 \ No newline at end of file
+2.71828182845 1.36437527942e-11
diff --git a/numpy/f2py/doc/multiarray/array_from_pyobj.c b/numpy/f2py/doc/multiarray/array_from_pyobj.c
index 03d4aacf6..237d16dbc 100644
--- a/numpy/f2py/doc/multiarray/array_from_pyobj.c
+++ b/numpy/f2py/doc/multiarray/array_from_pyobj.c
@@ -311,9 +311,9 @@ int check_and_fix_dimensions(const PyArrayObject* arr,const int rank,int *dims)
if (arr->dimensions[i]!=dims[i]) {
fprintf(stderr,"%d-th dimension must be fixed to %d but got %d\n",
i,dims[i],arr->dimensions[i]);
- return 1;
+ return 1;
}
- if (!dims[i]) dims[i] = 1;
+ if (!dims[i]) dims[i] = 1;
} else
dims[i] = arr->dimensions[i];
}
diff --git a/numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt b/numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt
index c7b945c84..e351e8e89 100644
--- a/numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt
+++ b/numpy/f2py/doc/multiarray/fortran_array_from_pyobj.txt
@@ -118,7 +118,7 @@ Statement of the problem:
=========================
Consider a M-by-N matrix A of integers, where M and N are the number A
-rows and columns, respectively.
+rows and columns, respectively.
In Fortran language, the storing array of this matrix can be defined
as follows:
@@ -192,7 +192,7 @@ if type(obj) is ArrayType:
set_transpose_strides(obj) # lazy-transpose
Py_INCREF(obj);
return obj
- set_transpose_strides(obj)
+ set_transpose_strides(obj)
if is_contiguous(obj):
set_transpose_strides(obj)
Py_INCREF(obj);
@@ -281,4 +281,4 @@ else:
14 January, 2002
-Pearu Peterson <pearu@cens.ioc.ee> \ No newline at end of file
+Pearu Peterson <pearu@cens.ioc.ee>
diff --git a/numpy/f2py/doc/multiarray/transpose.txt b/numpy/f2py/doc/multiarray/transpose.txt
index a8d41e6df..925e7a399 100644
--- a/numpy/f2py/doc/multiarray/transpose.txt
+++ b/numpy/f2py/doc/multiarray/transpose.txt
@@ -1,7 +1,7 @@
From: Phil Garner (garner@signal.dra.hmg.gb)
- Subject: In place matrix transpose
+ Subject: In place matrix transpose
Newsgroups: sci.math.num-analysis
- Date: 1993-08-05 06:35:06 PST
+ Date: 1993-08-05 06:35:06 PST
Someone was talking about matrix transposes earlier on. It's a
@@ -161,16 +161,16 @@ int trans(scalar *a, unsigned m, unsigned n, int *move, int iwrk)
`-0---0-' `-0--0-' `--OO-------------------O-----' `---0---' `-0---0-'
From: Murray Dow (mld900@anusf.anu.edu.au)
- Subject: Re: In place matrix transpose
+ Subject: Re: In place matrix transpose
Newsgroups: sci.math.num-analysis
- Date: 1993-08-09 19:45:57 PST
+ Date: 1993-08-09 19:45:57 PST
In article <23qmp3INN3gl@mentor.dra.hmg.gb>, garner@signal.dra.hmg.gb (Phil Garner) writes:
|> Someone was talking about matrix transposes earlier on. It's a
|> curious subject. I found that an in-place transpose is about 12 times
|> slower than the trivial copying method.
-|>
+|>
Algorithm 380 from CACM is sloweer than ALG 467. Here are my times
from a VP2200 vector computer. Note that the CACM algorithms are scalar.
@@ -188,7 +188,7 @@ My Alg Matrix copy
Conclusions: dont use Alg 380 from Netlib. If you have the available memory,
do a matrix copy. If you don't have the memory, I will send you my algorithm
when I have published it.
---
+--
Murray Dow GPO Box 4 Canberra ACT 2601 Australia
Supercomputer Facility Phone: +61 6 2495028
Australian National University Fax: +61 6 2473425
@@ -197,16 +197,16 @@ mld900@anusf.anu.edu.au
=============================================================================
From: Mark Smotherman (mark@hubcap.clemson.edu)
- Subject: Matrix transpose benchmark [was Re: MIPS R8000 == TFP?]
+ Subject: Matrix transpose benchmark [was Re: MIPS R8000 == TFP?]
Newsgroups: comp.arch, comp.benchmarks, comp.sys.super
- Date: 1994-07-01 06:35:51 PST
+ Date: 1994-07-01 06:35:51 PST
mccalpin@perelandra.cms.udel.edu (John D. McCalpin) writes:
->
->Of course, these results are all for the naive algorithm. I would be
->interested to see what an efficient blocked algorithm looks like.
+>
+>Of course, these results are all for the naive algorithm. I would be
+>interested to see what an efficient blocked algorithm looks like.
>Anyone care to offer one? There is clearly a lot of performance
>to be gained by the effort....
@@ -225,15 +225,15 @@ Enjoy!
Matrix Transpose Generator
Copyright 1993, Dept. of Computer Science, Clemson University
-
+
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appears in all copies.
-
+
Clemson University and its Dept. of Computer Science make no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
-
+
Original author: Mark Smotherman
-------------------------------------------------------------------------*/
@@ -624,14 +624,14 @@ void processstmt()
}
}
}
---
+--
Mark Smotherman, Computer Science Dept., Clemson University, Clemson, SC
=======================================================================
From: has (h.genceli@bre.com)
- Subject: transpose of a nxm matrix stored in a vector !!!
+ Subject: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
If I have a matrix nrows x ncols, I can store it in a vector.
@@ -657,9 +657,9 @@ can give me a lead here, thanks.
Has
From: wei-choon ng (wng@ux8.cso.uiuc.edu)
- Subject: Re: transpose of a nxm matrix stored in a vector !!!
+ Subject: Re: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
has <h.genceli@bre.com> wrote:
@@ -674,12 +674,12 @@ no need to explicitly store the transpose matrix in another array and
doubling the storage!
W.C.
---
+--
From: Robin Becker (robin@jessikat.fsnet.co.uk)
- Subject: Re: transpose of a nxm matrix stored in a vector !!!
+ Subject: Re: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
In article <snr532fo3j1180@corp.supernews.com>, has <h.genceli@bre.com>
@@ -737,13 +737,13 @@ void dmx_transpose(unsigned n, unsigned m, double* a, double* b)
}
}
}
---
+--
Robin Becker
From: E. Robert Tisdale (edwin@netwood.net)
- Subject: Re: transpose of a nxm matrix stored in a vector !!!
+ Subject: Re: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
Take a look at
@@ -798,14 +798,14 @@ The C++ Scalar, Vector, Matrix and Tensor class library
Read the rest of this message... (50 more lines)
From: Victor Eijkhout (eijkhout@disco.cs.utk.edu)
- Subject: Re: transpose of a nxm matrix stored in a vector !!!
+ Subject: Re: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
"Alan Miller" <amiller @ vic.bigpond.net.au> writes:
-> The attached routine does an in situ transpose.
+> The attached routine does an in situ transpose.
> begin 666 Dtip.f90
> M4U5"4D]55$E.12!D=&EP("AA+"!N,2P@;C(L(&YD:6TI#0HA("TM+2TM+2TM
@@ -814,22 +814,22 @@ Hm. F90? You're not silently allocating a temporary I hope?
(Why did you have to encode this? Now I have to save, this decode, ...
and all for plain ascii?)
---
+--
Victor Eijkhout
"When I was coming up, [..] we knew exactly who the they were. It was us
-versus them, and it was clear who the them was were. Today, we are not
+versus them, and it was clear who the them was were. Today, we are not
so sure who the they are, but we know they're there." [G.W. Bush]
From: Alan Miller (amiller_@_vic.bigpond.net.au)
- Subject: Re: transpose of a nxm matrix stored in a vector !!!
+ Subject: Re: transpose of a nxm matrix stored in a vector !!!
Newsgroups: sci.math.num-analysis
- Date: 2000/07/25
+ Date: 2000/07/25
Victor Eijkhout wrote in message ...
>"Alan Miller" <amiller @ vic.bigpond.net.au> writes:
>
->> The attached routine does an in situ transpose.
+>> The attached routine does an in situ transpose.
>> begin 666 Dtip.f90
>> M4U5"4D]55$E.12!D=&EP("AA+"!N,2P@;C(L(&YD:6TI#0HA("TM+2TM+2TM
>
@@ -862,13 +862,13 @@ http://users.bigpond.net.au/amiller/
=================================================================
From: Darran Edmundson (dedmunds@sfu.ca)
- Subject: array reordering algorithm?
+ Subject: array reordering algorithm?
Newsgroups: sci.math.num-analysis
- Date: 1995/04/30
+ Date: 1995/04/30
-A code I've written refers to a complex array as two separate real arrays.
-However, I have a canned subroutine which expects a single array where the
+A code I've written refers to a complex array as two separate real arrays.
+However, I have a canned subroutine which expects a single array where the
real and imaginary values alternate. Essentially I have a case of mismatched
data structures, yet for reasons that I'd rather not go into, I'm stuck with them.
@@ -878,7 +878,7 @@ space, what I need is a porting subroutine that remaps the data from one format
to the other - using as little space as possible.
I think of the problem as follows. Imagine an array of dimension 10 containing
-the values 1,3,5,7,9,2,4,6,8,10 in this order.
+the values 1,3,5,7,9,2,4,6,8,10 in this order.
A(1) / 1 \ C(1)
A(2) | 3 | C(2)
@@ -892,18 +892,18 @@ the values 1,3,5,7,9,2,4,6,8,10 in this order.
B(4) | 8 | C(9)
B(5) \ 10 / C(10)
-Given that I know this initial pattern, I want to sort the array C in-place *without
-making comparisons*. That is, the algorithm can only depend on the initial
+Given that I know this initial pattern, I want to sort the array C in-place *without
+making comparisons*. That is, the algorithm can only depend on the initial
knowledge of the pattern. Do you see what a sort is going to do? It will
make the A and B arrays alternate, i.e. C(1)=A(1), C(2)=B(1), C(3)=A(2),
-C(4)=B(2), etc. It's not a real sort though because I can't actually refer to the
+C(4)=B(2), etc. It's not a real sort though because I can't actually refer to the
values above (i.e. no comparisons) because A and B will be holding real data,
not this contrived pattern. The pattern above exists though - it's the
natural ordering in memory of A and B.
-Either pair swapping only or a small amount of workspace can be used. The
-in-place is important - imagine scaling this problem up to an
-array of 32 or 64 million double precision values and you can easily see how
+Either pair swapping only or a small amount of workspace can be used. The
+in-place is important - imagine scaling this problem up to an
+array of 32 or 64 million double precision values and you can easily see how
duplicating the array is not a feasible solution.
Any ideas? I've been stumped on this for a day and a half now.
@@ -912,9 +912,9 @@ Darran Edmundson
dedmunds@sfu.ca
From: Roger Critchlow (rec@elf115.elf.org)
- Subject: Re: array reordering algorithm?
+ Subject: Re: array reordering algorithm?
Newsgroups: sci.math.num-analysis
- Date: 1995/04/30
+ Date: 1995/04/30
Any ideas? I've been stumped on this for a day and a half now.
@@ -1026,7 +1026,7 @@ int test_matrix_cols(a, m, n) TYPE *a; int m, n;
o += a[i*n+j] != j*m+i;
return o;
}
-
+
/* print a matrix */
void print_matrix(a, m, n) TYPE *a; int m, n;
{
@@ -1121,7 +1121,6 @@ main(argc, argv) int argc; char *argv[];
return 0;
}
-
+
#endif
#endif
-
diff --git a/numpy/f2py/doc/multiarrays.txt b/numpy/f2py/doc/multiarrays.txt
index 704208976..75aeaab9a 100644
--- a/numpy/f2py/doc/multiarrays.txt
+++ b/numpy/f2py/doc/multiarrays.txt
@@ -89,7 +89,7 @@ subroutine foo(l,m,n,a)
integer :: n
real*8 dimension(l,m,n),check(rank(a)==3),depend(l,m,n), &
check(shape(a,2)==l,shape(a,1)==m,shape(a,0)==n):: a
- optional a
+ optional a
end
Note again that the array a must depend on l,m,n. Then the array a will be
allocated in the Python C/API module. Not also that
@@ -117,4 +117,3 @@ wrapping Fortran multidimensional arrays with f2py2e.
Regards,
Pearu
-
diff --git a/numpy/f2py/doc/using_F_compiler.txt b/numpy/f2py/doc/using_F_compiler.txt
index 3067f0776..63bb0d68c 100644
--- a/numpy/f2py/doc/using_F_compiler.txt
+++ b/numpy/f2py/doc/using_F_compiler.txt
@@ -46,7 +46,7 @@ Required arguments:
>>> from Numeric import array
>>> a = array(3)
->>> fun.foo.bar(a)
+>>> fun.foo.bar(a)
Hello from foo.bar
a= 3
a= 8
@@ -54,7 +54,7 @@ Required arguments:
8
>>>
-This works nicely with all supported Fortran compilers.
+This works nicely with all supported Fortran compilers.
However, the F compiler (http://www.fortran.com/F/compilers.html) is
an exception. Namely, the F compiler is designed to recognize only
@@ -117,7 +117,7 @@ value of `a'.
4) Build the extension module
f2py -c foo.pyf foo.o --fcompiler=Gnu /opt/F/lib/quickfit.o \
- /opt/F/lib/libf96.a
+ /opt/F/lib/libf96.a
This will create the extension module foo.so into the current
directory. Notice that you must use Gnu compiler (gcc) for linking.
@@ -137,7 +137,7 @@ Return objects:
>>> foo.bar(3)
8
->>>
+>>>
Notice that the F compiled module procedures are called as ordinary
external procedures. Also I/O seems to be lacking for F compiled
diff --git a/numpy/f2py/docs/FAQ.txt b/numpy/f2py/docs/FAQ.txt
index 416560e92..4b50933cf 100644
--- a/numpy/f2py/docs/FAQ.txt
+++ b/numpy/f2py/docs/FAQ.txt
@@ -238,7 +238,7 @@ constructs in future. But note that the task in non-trivial and may
require the next edition of F2PY for which I don't have resources to
work with at the moment.
-Jeffrey Hagelberg from LLNL has made progress on adding
+Jeffrey Hagelberg from LLNL has made progress on adding
support for derived types to f2py. He writes:
At this point, I have a version of f2py that supports derived types
@@ -543,7 +543,7 @@ __ http://www.met.ed.ac.uk/~cory/PyARTS/
+ `Python interface to PSPLINE`__, a collection of Spline and
Hermite interpolation tools for 1D, 2D, and 3D datasets on
- rectilinear grids.
+ rectilinear grids.
__ http://pypspline.sourceforge.net
@@ -572,11 +572,11 @@ Here are some comments people have posted to f2py mailing list and c.l.py:
+ Fernando Perez: Anyway, many many thanks for this amazing tool.
- I haven't used pyfort, but I can definitely vouch for the amazing quality of
- f2py. And since f2py is actively used by numpy, it won't go unmaintained.
+ I haven't used pyfort, but I can definitely vouch for the amazing quality of
+ f2py. And since f2py is actively used by numpy, it won't go unmaintained.
It's quite impressive, and very easy to use.
-+ Kevin Mueller: First off, thanks to those responsible for F2PY;
++ Kevin Mueller: First off, thanks to those responsible for F2PY;
its been an integral tool of my research for years now.
+ David Linke: Best regards and thanks for the great tool!
diff --git a/numpy/f2py/docs/HISTORY.txt b/numpy/f2py/docs/HISTORY.txt
index 077189ee2..4326e4852 100644
--- a/numpy/f2py/docs/HISTORY.txt
+++ b/numpy/f2py/docs/HISTORY.txt
@@ -38,7 +38,7 @@ Release 2.46.243
- Fixed missing need kw error.
- Fixed getting callback non-existing extra arguments.
- - External callback functions and extra_args can be set via
+ - External callback functions and extra_args can be set via
ext.module namespace.
- Avoid crash when external callback function is not set.
@@ -46,7 +46,7 @@ Release 2.46.243
- Enabled ``intent(out)`` for ``intent(aux)`` non-complex scalars.
- Fixed splitting lines in F90 fixed form mode.
- - Fixed FORTRANAME typo, relevant when wrapping scalar functions with
+ - Fixed FORTRANAME typo, relevant when wrapping scalar functions with
``--no-wrap-functions``.
- Improved failure handling for callback functions.
- Fixed bug in writting F90 wrapper functions when a line length
@@ -65,8 +65,8 @@ Release 2.46.243
* crackfortran.py
- - Introduced parent_block key. Get ``use`` statements recursively
- from parent blocks.
+ - Introduced parent_block key. Get ``use`` statements recursively
+ from parent blocks.
- Apply parameter values to kindselectors.
- Fixed bug evaluating ``selected_int_kind`` function.
- Ignore Name and Syntax errors when evaluating scalars.
@@ -135,7 +135,7 @@ Release 2.45.241_1926
functional at the moment.
- Introduced ``intent(aux)`` attribute. Useful to save a value
of a parameter to auxiliary C variable. Note that ``intent(aux)``
- implies ``intent(c)``.
+ implies ``intent(c)``.
- Added ``usercode`` section. When ``usercode`` is used in ``python
module`` block twise then the contents of the second multi-line
block is inserted after the definition of external routines.
@@ -173,7 +173,7 @@ Release 2.43.239_1831
* fortranobject.c
- Patch to make PyArray_CanCastSafely safe on 64-bit machines.
- Fixes incorrect results when passing ``array('l')`` to
+ Fixes incorrect results when passing ``array('l')`` to
``real*8 intent(in,out,overwrite)`` arguments.
* rules.py
@@ -278,14 +278,14 @@ Release 2.43.239_1806
- Added support for multiple statements in one line (separated with semicolon).
- Impl. get_useparameters function for using parameter values from
other f90 modules.
- - Applied Bertholds patch to fix bug in evaluating expressions
+ - Applied Bertholds patch to fix bug in evaluating expressions
like ``1.d0/dvar``.
- Fixed bug in reading string parameters.
- Evaluating parameters in charselector. Code cleanup.
- Using F90 module parameters to resolve kindselectors.
- Made the evaluation of module data init-expression more robust.
- Support for ``entry`` statement.
- - Fixed ``determineexprtype`` that in the case of parameters
+ - Fixed ``determineexprtype`` that in the case of parameters
returned non-dictionary objects.
- Use ``-*- fix -*-`` to specify that a file is in fixed format.
@@ -316,7 +316,7 @@ Release 2.39.235_1693
- Handle ``XDY`` parameter constants.
- - Introduced formatpattern to workaround a corner case where reserved
+ - Introduced formatpattern to workaround a corner case where reserved
keywords are used in format statement. Other than that, format pattern
has no use.
@@ -371,7 +371,7 @@ Release 2.39.235_1644
- Fixed bug in Fortran 90 comments of fixed format.
- Warn when .pyf signatures contain undefined symbols.
- Better detection of source code formats. Using ``-*- fortran -*-``
- or ``-*- f90 -*-`` in the first line of a Fortran source file is
+ or ``-*- f90 -*-`` in the first line of a Fortran source file is
recommended to help f2py detect the format, fixed or free,
respectively, correctly.
@@ -409,7 +409,7 @@ Release 2.39.235_1644
* setup.py
- - Installing f2py.py instead of f2py.bat under NT.
+ - Installing f2py.py instead of f2py.bat under NT.
- Introduced ``--with-numpy_distutils`` that is useful when making
f2py tar-ball with numpy_distutils included.
@@ -451,7 +451,7 @@ Release 2.37.233-1545
- Fixed segfaults (that were introduced with recent memory leak
fixes) when using allocatable arrays.
- - Introduced F2PY_REPORT_ON_ARRAY_COPY CPP macro int-variable. If defined
+ - Introduced F2PY_REPORT_ON_ARRAY_COPY CPP macro int-variable. If defined
then a message is printed to stderr whenever a copy of an array is
made and arrays size is larger than F2PY_REPORT_ON_ARRAY_COPY.
@@ -547,7 +547,7 @@ Public Release 2.32.225-1419
* docs/usersguide/
- Complete revision of F2PY Users Guide
+ Complete revision of F2PY Users Guide
* tests/run_all.py
@@ -598,8 +598,8 @@ Public Release 2.32.225-1419
- Introduced multiline block. Currently usable only for
``callstatement`` statement.
- Improved array length calculation in getarrlen(..).
- - "From sky" program group is created only if ``groupcounter<1``.
- See TODO.txt.
+ - "From sky" program group is created only if ``groupcounter<1``.
+ See TODO.txt.
- Added support for ``dimension(n:*)``, ``dimension(*:n)``. They are
treated as ``dimesnion(*)`` by f2py.
- Fixed parameter substitution (this fixes TODO item by Patrick
@@ -640,7 +640,7 @@ Public Release 2.32.225-1419
* src/fortranobject.c
- - Multi-dimensional common block members and allocatable arrays
+ - Multi-dimensional common block members and allocatable arrays
are returned as Fortran-contiguous arrays.
- Fixed NULL return to Python without exception.
- Fixed memory leak in getattr(<fortranobj>,'__doc__').
@@ -667,7 +667,7 @@ Public Release 2.32.225-1419
- Introduced dummy routine feature.
- F77 and F90 wrapper subroutines (if any) as saved to different
files, <modulename>-f2pywrappers.f and <modulename>-f2pywrappers2.f90,
- respectively. Therefore, wrapping F90 requires numpy_distutils >=
+ respectively. Therefore, wrapping F90 requires numpy_distutils >=
0.2.0_alpha_2.229.
- Fixed compiler warnings about meaningless ``const void (*f2py_func)(..)``.
- Improved error messages for ``*_from_pyobj``.
@@ -690,9 +690,9 @@ Public Release 2.32.225-1419
- (float|long_double)_from_pyobj now use double_from_pyobj.
- complex_(float|long_double)_from_pyobj now use complex_double_from_pyobj.
- Rewrote ``*_from_pyobj`` to be more robust. This fixes segfaults if
- getting * from a string. Note that int_from_pyobj differs
- from PyNumber_Int in that it accepts also complex arguments
- (takes the real part) and sequences (takes the 1st element).
+ getting * from a string. Note that int_from_pyobj differs
+ from PyNumber_Int in that it accepts also complex arguments
+ (takes the real part) and sequences (takes the 1st element).
- Removed unnecessary void* casts in NUMFROMARROBJ.
- Fixed casts in ``*_from_pyobj`` functions.
- Replaced CNUMFROMARROBJ with NUMFROMARROBJ.
@@ -704,7 +704,7 @@ Public Release 2.32.225-1419
- Introduced isdummyroutine().
- Fixed islong_* functions.
- Fixed isintent_in for intent(c) arguments (bug report: Pierre Schnizer).
- - Introduced F2PYError and throw_error. Using throw_error, f2py
+ - Introduced F2PYError and throw_error. Using throw_error, f2py
rejects illegal .pyf file constructs that otherwise would cause
compilation failures or python crashes.
- Fixed islong_long(logical*8)->True.
@@ -715,7 +715,7 @@ Public Release 2.32.225-1419
* Speed up for ``*_from_pyobj`` functions if obj is a sequence.
-* Fixed SegFault (reported by M.Braun) due to invalid ``Py_DECREF``
+* Fixed SegFault (reported by M.Braun) due to invalid ``Py_DECREF``
in ``GETSCALARFROMPYTUPLE``.
Older Releases
@@ -737,7 +737,7 @@ Older Releases
*** Fixed the order of build_flib options when using --fcompiler=...
*** Recognize .f95 and .F95 files as Fortran sources with free format.
*** Cleaned up the output of 'f2py -h': removed obsolete items,
- added build_flib options section.
+ added build_flib options section.
*** Added --help-compiler option: it lists available Fortran compilers
as detected by numpy_distutils/command/build_flib.py. This option
is available only with -c option.
@@ -748,7 +748,7 @@ Older Releases
::
- *** Fixed copying of non-contigious 1-dimensional arrays bug.
+ *** Fixed copying of non-contigious 1-dimensional arrays bug.
(Thanks to Travis O.).
@@ -760,7 +760,7 @@ Older Releases
*** Fixed ignoring type declarations.
*** Turned F2PY_REPORT_ATEXIT off by default.
*** Made MAX,MIN macros available by default so that they can be
- always used in signature files.
+ always used in signature files.
*** Disabled F2PY_REPORT_ATEXIT for FreeBSD.
@@ -791,7 +791,7 @@ Older Releases
*** Updated f2py for the latest numpy_distutils.
*** A nasty bug with multi-dimensional Fortran arrays is fixed
- (intent(out) arrays had wrong shapes). (Thanks to Eric for
+ (intent(out) arrays had wrong shapes). (Thanks to Eric for
pointing out this bug).
*** F2PY_REPORT_ATEXIT is disabled by default for __WIN32__.
@@ -809,9 +809,9 @@ Older Releases
*** Introduced 'callprotoargument' statement so that proper prototypes
can be declared. This is crucial when wrapping C functions as it
will fix segmentation faults when these wrappers use non-pointer
- arguments (thanks to R. Clint Whaley for explaining this to me).
+ arguments (thanks to R. Clint Whaley for explaining this to me).
Note that in f2py generated wrapper, the prototypes have
- the following forms:
+ the following forms:
extern #rtype# #fortranname#(#callprotoargument#);
or
extern #rtype# F_FUNC(#fortranname#,#FORTRANNAME#)(#callprotoargument#);
@@ -831,7 +831,7 @@ Older Releases
intent(overwrite) will make default overwrite_<name>=1.
*** Introduced intent(in|inout,out,out=<name>) attribute that renames
arguments name when returned. This renaming has effect only in
- documentation strings.
+ documentation strings.
*** Introduced 'callstatement' statement to pyf file syntax. With this
one can specify explicitly how wrapped function should be called
from the f2py generated module. WARNING: this is a dangerous feature
@@ -841,7 +841,7 @@ Older Releases
be used only inside a subroutine or function block (it should be enough
though) and must be only in one continuous line. The syntax of the
statement is: callstatement <C-expression>;
-
+
:Release: 2.11.174
:Date: 18 January 2002
@@ -852,23 +852,23 @@ Older Releases
*** Introduced extra keyword argument copy_<varname> for intent(copy)
variables. It defaults to 1 and forces to make a copy for
intent(in) variables when passing on to wrapped functions (in case
- they undesirably change the variable in-situ).
+ they undesirably change the variable in-situ).
*** Introduced has_column_major_storage member function for all f2py
generated extension modules. It is equivalent to Python call
'transpose(obj).iscontiguous()' but very efficient.
*** Introduced -DF2PY_REPORT_ATEXIT. If this is used when compiling,
a report is printed to stderr as python exits. The report includes
- the following timings:
- 1) time spent in all wrapped function calls;
+ the following timings:
+ 1) time spent in all wrapped function calls;
2) time spent in f2py generated interface around the wrapped
functions. This gives a hint whether one should worry
about storing data in proper order (C or Fortran).
3) time spent in Python functions called by wrapped functions
through call-back interface.
4) time spent in f2py generated call-back interface.
- For now, -DF2PY_REPORT_ATEXIT is enabled by default. Use
+ For now, -DF2PY_REPORT_ATEXIT is enabled by default. Use
-DF2PY_REPORT_ATEXIT_DISABLE to disable it (I am not sure if
- Windows has needed tools, let me know).
+ Windows has needed tools, let me know).
Also, I appreciate if you could send me the output of 'F2PY
performance report' (with CPU and platform information) so that I
could optimize f2py generated interfaces for future releases.
@@ -885,15 +885,15 @@ Older Releases
may be useful for cases where the wrapped function changes
the argument in situ and this may not be desired side effect.
Otherwise, it is safe to not use intent(copy) for the sake
- of a better performance.
- intent(cache,hide|optional) - just creates a junk of memory.
+ of a better performance.
+ intent(cache,hide|optional) - just creates a junk of memory.
It does not care about proper storage order. Can be also
intent(in) but then the corresponding argument must be a
contiguous array with a proper elsize.
*** intent(c) can be used also for subroutine names so that
-DNO_APPEND_FORTRAN can be avoided for C functions.
- *** IMPORTANT BREAKING GOOD ... NEWS!!!:
+ *** IMPORTANT BREAKING GOOD ... NEWS!!!:
From now on you don't have to worry about the proper storage order
in multi-dimensional arrays that was earlier a real headache when
@@ -929,14 +929,14 @@ Older Releases
changed.
*** Introduced test-site/test_f2py2e.py script that runs all
tests.
- *** Fixed global variables initialization problem in crackfortran
+ *** Fixed global variables initialization problem in crackfortran
when run_main is called several times.
*** Added 'import Numeric' to C/API init<module> function.
*** Fixed f2py.bat in setup.py.
*** Switched over to numpy_distutils and dropped fortran_support.
*** On Windows create f2py.bat file.
*** Introduced -c option: read fortran or pyf files, construct extension
- modules, build, and save them to current directory.
+ modules, build, and save them to current directory.
In one word: do-it-all-in-one-call.
*** Introduced pyf_extensions(sources,f2py_opts) function. It simplifies
the extension building process considerably. Only for internal use.
@@ -983,7 +983,7 @@ Older Releases
and caused core dump with a non-gcc compiler (Thanks to Pierre Schnizer
for reporting this bug).
*** Fixed "warning: variable `..' might be clobbered by `longjmp' or `vfork'":
- - Reorganized the structure of wrapper functions to get rid of
+ - Reorganized the structure of wrapper functions to get rid of
`goto capi_fail' statements that caused the above warning.
@@ -1038,7 +1038,6 @@ Older Releases
feature. setup_<modulename>.py uses fortran_support module (from SciPy),
but for your convenience it is included also with f2py as an additional
package. Note that it has not as many compilers supported as with
- using Makefile-<modulename>, but new compilers should be added to
+ using Makefile-<modulename>, but new compilers should be added to
fortran_support module, not to f2py2e package.
*** Fixed some compiler warnings about else statements.
-
diff --git a/numpy/f2py/docs/OLDNEWS.txt b/numpy/f2py/docs/OLDNEWS.txt
index 401d2dcee..23d332e35 100644
--- a/numpy/f2py/docs/OLDNEWS.txt
+++ b/numpy/f2py/docs/OLDNEWS.txt
@@ -60,4 +60,4 @@
.. _HISTORY.txt: HISTORY.html
.. _Numarray: http://www.stsci.edu/resources/software_hardware/numarray
-.. _TESTING.txt: TESTING.html \ No newline at end of file
+.. _TESTING.txt: TESTING.html
diff --git a/numpy/f2py/docs/README.txt b/numpy/f2py/docs/README.txt
index cec8a6ec0..f232f1d5d 100644
--- a/numpy/f2py/docs/README.txt
+++ b/numpy/f2py/docs/README.txt
@@ -21,10 +21,10 @@ __ FAQ.html
.. topic:: NEWS!!!
January 5, 2006
-
+
WARNING -- these notes are out of date! The package structure for NumPy and
SciPy has changed considerably. Much of this information is now incorrect.
-
+
January 30, 2005
Latest F2PY release (version 2.45.241_1926).
@@ -47,7 +47,7 @@ __ FAQ.html
__ http://cens.ioc.ee/cgi-bin/cvsweb/python/f2py2e/docs/HISTORY.txt.diff?r1=1.137&r2=1.131&f=h
September 25, 2004
- Latest F2PY release (version 2.43.239_1806).
+ Latest F2PY release (version 2.43.239_1806).
Support for ``ENTRY`` statement. New attributes:
``intent(inplace)``, ``intent(callback)``. Supports Numarray 1.1.
Introduced ``-*- fix -*-`` header content. Improved ``PARAMETER`` support.
@@ -150,7 +150,7 @@ Here follows a more detailed list of F2PY features:
<dim> | <start>:<end> | * | :
+ Attributes and statements::
-
+
intent([ in | inout | out | hide | in,out | inout,out | c |
copy | cache | callback | inplace | aux ])
dimension(<dimspec>)
@@ -249,7 +249,7 @@ Unpack the source file, change to directrory ``F2PY-?-???/`` and run
The F2PY installation installs a Python package ``f2py2e`` to your
Python ``site-packages`` directory and a script ``f2py`` to your
-Python executable path.
+Python executable path.
See also Installation__ section in `F2PY FAQ`_.
@@ -287,7 +287,7 @@ __ hello.f
2) Run
::
-
+
f2py -c -m hello hello.f
This will build an extension module ``hello.so`` (or ``hello.sl``,
@@ -299,12 +299,12 @@ __ hello.f
>>> import hello
>>> print hello.__doc__
>>> print hello.foo.__doc__
- >>> hello.foo(4)
+ >>> hello.foo(4)
Hello from Fortran!
a= 4
- >>>
+ >>>
-If the above works, then you can try out more thorough
+If the above works, then you can try out more thorough
`F2PY unit tests`__ and read the `F2PY Users Guide and Reference Manual`_.
__ FAQ.html#q-how-to-test-if-f2py-is-working-correctly
@@ -354,7 +354,7 @@ __ http://cens.ioc.ee/cgi-bin/cvsweb/python/f2py2e/docs/HISTORY.txt?rev=HEAD&con
A mailing list f2py-users@cens.ioc.ee is open for F2PY releated
discussion/questions/etc.
-* `Subscribe..`__
+* `Subscribe..`__
* `Archives..`__
__ http://cens.ioc.ee/mailman/listinfo/f2py-users
@@ -412,9 +412,9 @@ __ http://jrfonseca.dyndns.org/debian/
* `American National Standard Programming Language FORTRAN ANSI(R) X3.9-1978`__
* `J3`_ -- The US Fortran standards committee.
* SWIG_ -- A software development tool that connects programs written
- in C and C++ with a variety of high-level programming languages.
+ in C and C++ with a variety of high-level programming languages.
* `Mathtools.net`_ -- A technical computing portal for all scientific
- and engineering needs.
+ and engineering needs.
.. __: http://www.fortran.com/fortran/F77_std/rjcnf.html
@@ -445,7 +445,7 @@ __ http://jrfonseca.dyndns.org/debian/
.. _distutils: http://www.python.org/sigs/distutils-sig/
.. _Numerical Python: http://www.numpy.org/
.. _Pyfort: http://pyfortran.sourceforge.net/
-.. _Scientific Python:
+.. _Scientific Python:
http://starship.python.net/crew/hinsen/scientific.html
.. _The Fortran Company: http://www.fortran.com/fortran/
.. _J3: http://www.j3-fortran.org/
diff --git a/numpy/f2py/docs/TESTING.txt b/numpy/f2py/docs/TESTING.txt
index d90521175..a6df92c48 100644
--- a/numpy/f2py/docs/TESTING.txt
+++ b/numpy/f2py/docs/TESTING.txt
@@ -35,7 +35,7 @@ Tests
about the failure.
* Test intent(in), intent(out) scalar arguments,
- scalars returned by F77 functions
+ scalars returned by F77 functions
and F90 module functions::
tests/f77/return_integer.py
diff --git a/numpy/f2py/docs/THANKS.txt b/numpy/f2py/docs/THANKS.txt
index 0a3f0b9d6..636540687 100644
--- a/numpy/f2py/docs/THANKS.txt
+++ b/numpy/f2py/docs/THANKS.txt
@@ -4,7 +4,7 @@
=================
F2PY__ is an open source Python package and command line tool developed and
-maintained by Pearu Peterson (me__).
+maintained by Pearu Peterson (me__).
.. __: http://cens.ioc.ee/projects/f2py2e/
.. __: http://cens.ioc.ee/~pearu/
diff --git a/numpy/f2py/docs/usersguide/index.txt b/numpy/f2py/docs/usersguide/index.txt
index 5a8d12c68..7b26cac54 100644
--- a/numpy/f2py/docs/usersguide/index.txt
+++ b/numpy/f2py/docs/usersguide/index.txt
@@ -4,7 +4,7 @@
F2PY Users Guide and Reference Manual
//////////////////////////////////////////////////////////////////////
-:Author: Pearu Peterson
+:Author: Pearu Peterson
:Contact: pearu@cens.ioc.ee
:Web site: http://cens.ioc.ee/projects/f2py2e/
:Date: $Date: 2005/04/02 10:03:26 $
@@ -97,7 +97,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``::
a : input rank-1 array('d') with bounds (n)
Optional arguments:
n := len(a) input int
-
+
>>> a=Numeric.zeros(8,'d')
>>> fib1.fib(a)
>>> print a
@@ -125,7 +125,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``::
Traceback (most recent call last):
File "<stdin>", line 1, in ?
fib.error: (len(a)>=n) failed for 1st keyword n
- >>>
+ >>>
This demonstrates one of the useful features in F2PY, that it,
F2PY implements basic compatibility checks between related
@@ -236,8 +236,8 @@ In Python::
n : input int
Return objects:
a : rank-1 array('d') with bounds (n)
-
- >>> print fib2.fib(8)
+
+ >>> print fib2.fib(8)
[ 0. 1. 1. 2. 3. 5. 8. 13.]
.. topic:: Comments
@@ -292,8 +292,8 @@ previous case::
n : input int
Return objects:
a : rank-1 array('d') with bounds (n)
-
- >>> print fib3.fib(8)
+
+ >>> print fib3.fib(8)
[ 0. 1. 1. 2. 3. 5. 8. 13.]
@@ -405,17 +405,17 @@ Type declarations
::
- <typespec> := byte | character [<charselector>]
+ <typespec> := byte | character [<charselector>]
| complex [<kindselector>] | real [<kindselector>]
- | double complex | double precision
+ | double complex | double precision
| integer [<kindselector>] | logical [<kindselector>]
- <charselector> := * <charlen>
+ <charselector> := * <charlen>
| ( [len=] <len> [ , [kind=] <kind>] )
| ( kind= <kind> [ , len= <len> ] )
<kindselector> := * <intlen> | ( [kind=] <kind> )
- <entitydecl> := <name> [ [ * <charlen> ] [ ( <arrayspec> ) ]
+ <entitydecl> := <name> [ [ * <charlen> ] [ ( <arrayspec> ) ]
| [ ( <arrayspec> ) ] * <charlen> ]
| [ / <init_expr> / | = <init_expr> ] \
[ , <entitydecl> ]
@@ -425,7 +425,7 @@ Type declarations
+ ``<attrspec>`` is a comma separated list of attributes_;
+ ``<arrayspec>`` is a comma separated list of dimension bounds;
-
+
+ ``<init_expr>`` is a `C expression`__.
+ ``<intlen>`` may be negative integer for ``integer`` type
@@ -463,7 +463,7 @@ Use statements:
<rename_list> := <local_name> => <use_name> [ , <rename_list> ]
Currently F2PY uses ``use`` statement only for linking call-back
- modules and ``external`` arguments (call-back functions), see
+ modules and ``external`` arguments (call-back functions), see
`Call-back arguments`_.
Common block statements:
@@ -570,10 +570,10 @@ __ external_
corresponding prototype::
extern <return type> FUNC_F(<routine name>,<ROUTINE NAME>)(<callprotoargument>);
-
+
+ ``fortranname [<acctual Fortran/C routine name>]``
You can use arbitrary ``<routine name>`` for a given Fortran/C
- function. Then you have to specify
+ function. Then you have to specify
``<acctual Fortran/C routine name>`` with this statement.
If ``fortranname`` statement is used without
@@ -605,7 +605,7 @@ __ external_
module methods ``PyMethodDef``-array. It must be a
comma-separated list of C arrays (see `Extending and Embedding`__
Python documentation for details).
- ``pymethoddef`` statement can be used only inside
+ ``pymethoddef`` statement can be used only inside
``python module`` block.
__ http://www.python.org/doc/current/ext/ext.html
@@ -626,7 +626,7 @@ The following attributes are used by F2PY:
For an optional array argument, all its dimensions must be bounded.
-``required``
+``required``
The corresponding argument is considered as a required one. This is
default. You need to specify ``required`` only if there is a need to
disable automatic ``optional`` setting when ``<init_expr>`` is used.
@@ -691,7 +691,7 @@ The following attributes are used by F2PY:
argument like in the following example::
integer intent(hide),depend(a) :: n = len(a)
- real intent(in),dimension(n) :: a
+ real intent(in),dimension(n) :: a
+ ``c``
The argument is treated as a C scalar or C array argument. In
@@ -809,7 +809,7 @@ The following attributes are used by F2PY:
``external``
The corresponding argument is a function provided by user. The
- signature of this so-called call-back function can be defined
+ signature of this so-called call-back function can be defined
- in ``__user__`` module block,
- or by demonstrative (or real, if the signature file is a real Fortran
@@ -964,12 +964,12 @@ All wrappers (to Fortran/C routines or to common blocks or to Fortran
90 module data) generated by F2PY are exposed to Python as ``fortran``
type objects. Routine wrappers are callable ``fortran`` type objects
while wrappers to Fortran data have attributes referring to data
-objects.
+objects.
All ``fortran`` type object have attribute ``_cpointer`` that contains
CObject referring to the C pointer of the corresponding Fortran/C
function or variable in C level. Such CObjects can be used as an
-callback argument of F2PY generated functions to bypass Python C/API
+callback argument of F2PY generated functions to bypass Python C/API
layer of calling Python functions from Fortran or C when the
computational part of such functions is implemented in C or Fortran
and wrapped with F2PY (or any other tool capable of providing CObject
@@ -1047,7 +1047,7 @@ expects an array version of a string in order to *in situ* changes to
be effective.
.. topic:: Example
-
+
Consider the following `Fortran 77 code`__:
.. include:: string.f
@@ -1439,7 +1439,7 @@ distinguished by the usage of ``-c`` and ``-h`` switches:
"filename.ext"
<filename.ext>
-
+
The include statement is inserted just before the wrapper
functions. This feature enables using arbitrary C functions
(defined in ``<includefile>``) in F2PY generated wrappers.
@@ -1457,7 +1457,7 @@ distinguished by the usage of ``-c`` and ``-h`` switches:
``--include-paths <path1>:<path2>:..``
Search include files from given directories.
- ``--help-link [<list of resources names>]``
+ ``--help-link [<list of resources names>]``
List system resources found by ``numpy_distutils/system_info.py``.
For example, try ``f2py --help-link lapack_opt``.
@@ -1490,9 +1490,9 @@ distinguished by the usage of ``-c`` and ``-h`` switches:
``--fcompiler=<Vendor>``
Specify Fortran compiler type by vendor.
``--f77exec=<path>``
- Specify the path to F77 compiler
+ Specify the path to F77 compiler
``--fcompiler-exec=<path>`` [depreciated]
- Specify the path to F77 compiler
+ Specify the path to F77 compiler
``--f90exec=<path>``
Specify the path to F90 compiler
``--f90compiler-exec=<path>`` [depreciated]
@@ -1553,7 +1553,7 @@ distinguished by the usage of ``-c`` and ``-h`` switches:
Other options:
``-m <modulename>``
- Name of an extension module. Default is ``untitled``. Don't use this option
+ Name of an extension module. Default is ``untitled``. Don't use this option
if a signature file (*.pyf) is used.
``--[no-]lower``
Do [not] lower the cases in ``<fortran files>``. By default,
@@ -1602,7 +1602,7 @@ The following functions are provided by the ``f2py2e`` module:
``compile(source, modulename='untitled', extra_args='', verbose=1, source_fn=None)``
- Build extension module from Fortran 77 source string ``source``.
+ Build extension module from Fortran 77 source string ``source``.
Return 0 if successful.
Note that this function actually calls ``f2py -c ..`` from shell to
ensure safety of the current Python process.
@@ -1618,7 +1618,7 @@ Using ``numpy_distutils``
``numpy_distutils`` is part of the SciPy_ project and aims to extend
standard Python ``distutils`` to deal with Fortran sources and F2PY
signature files, e.g. compile Fortran sources, call F2PY to construct
-extension modules, etc.
+extension modules, etc.
.. topic:: Example
@@ -1664,7 +1664,7 @@ extension modules, etc.
``config_fc``
to change Fortran compiler options
- as well as ``build_ext`` and ``build_clib`` commands are enhanced
+ as well as ``build_ext`` and ``build_clib`` commands are enhanced
to support Fortran sources.
Run
@@ -1679,7 +1679,7 @@ extension modules, etc.
can choose different Fortran compilers by using ``build_ext``
command option ``--fcompiler=<Vendor>``. Here ``<Vendor>`` can be one of the
following names::
-
+
absoft sun mips intel intelv intele intelev nag compaq compaqv gnu vast pg hpux
See ``numpy_distutils/fcompiler.py`` for up-to-date list of
@@ -1712,7 +1712,7 @@ extension modules, etc.
command option ``--fcompiler=<Vendor>`` or by defining environment
variable ``FC_VENDOR=<Vendor>``. Here ``<Vendor>`` can be one of the
following names::
-
+
Absoft Sun SGI Intel Itanium NAG Compaq Digital Gnu VAST PG
See ``numpy_distutils/command/build_flib.py`` for up-to-date list of
@@ -1740,7 +1740,7 @@ wraps the C library function ``system()``::
In Python:
.. include:: spam_session.dat
- :literal:
+ :literal:
Modifying the dictionary of a F2PY generated module
===================================================
diff --git a/numpy/f2py/func2subr.py b/numpy/f2py/func2subr.py
index f69750dd0..1698d0e40 100644
--- a/numpy/f2py/func2subr.py
+++ b/numpy/f2py/func2subr.py
@@ -92,7 +92,7 @@ def createfuncwrapper(rout,signature=0):
v['dimension'][i] = dn
rout['args'].extend(extra_args)
need_interface = bool(extra_args)
-
+
ret = ['']
def add(line,ret=ret):
ret[0] = '%s\n %s'%(ret[0],line)
@@ -150,7 +150,7 @@ def createfuncwrapper(rout,signature=0):
for a in args:
if a in dumped_args: continue
add(var2fixfortran(vars,a,f90mode=f90mode))
-
+
add(l)
if need_interface:
@@ -289,4 +289,3 @@ def assubr(rout):
rout = copy.copy(rout)
return rout,createsubrwrapper(rout)
return rout,''
-
diff --git a/numpy/fft/fftpack.py b/numpy/fft/fftpack.py
index 4961b2989..2ca6cc668 100644
--- a/numpy/fft/fftpack.py
+++ b/numpy/fft/fftpack.py
@@ -273,7 +273,7 @@ def rfft(a, n=None, axis=-1):
out : complex ndarray
The truncated or zero-padded input, transformed along the axis
indicated by `axis`, or the last one if `axis` is not specified.
- If `n` is even, the length of the transformed axis is ``(n/2)+1``.
+ If `n` is even, the length of the transformed axis is ``(n/2)+1``.
If `n` is odd, the length is ``(n+1)/2``.
Raises
@@ -298,13 +298,13 @@ def rfft(a, n=None, axis=-1):
compute the negative frequency terms, and the length of the transformed
axis of the output is therefore ``n//2+1``.
- When ``A = rfft(a)`` and fs is the sampling frequency, ``A[0]`` contains
+ When ``A = rfft(a)`` and fs is the sampling frequency, ``A[0]`` contains
the zero-frequency term 0*fs, which is real due to Hermitian symmetry.
- If `n` is even, ``A[-1]`` contains the term representing both positive
- and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
- real. If `n` is odd, there is no term at fs/2; ``A[-1]`` contains
- the largest positive frequency (fs/2*(n-1)/n), and is complex in the
+ If `n` is even, ``A[-1]`` contains the term representing both positive
+ and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
+ real. If `n` is odd, there is no term at fs/2; ``A[-1]`` contains
+ the largest positive frequency (fs/2*(n-1)/n), and is complex in the
general case.
If the input `a` contains an imaginary part, it is silently discarded.
diff --git a/numpy/fft/helper.py b/numpy/fft/helper.py
index 0a475153f..058f6864d 100644
--- a/numpy/fft/helper.py
+++ b/numpy/fft/helper.py
@@ -125,8 +125,8 @@ def fftfreq(n, d=1.0):
"""
Return the Discrete Fourier Transform sample frequencies.
- The returned float array `f` contains the frequency bin centers in cycles
- per unit of the sample spacing (with zero at the start). For instance, if
+ The returned float array `f` contains the frequency bin centers in cycles
+ per unit of the sample spacing (with zero at the start). For instance, if
the sample spacing is in seconds, then the frequency unit is cycles/second.
Given a window length `n` and a sample spacing `d`::
@@ -140,7 +140,7 @@ def fftfreq(n, d=1.0):
Window length.
d : scalar, optional
Sample spacing (inverse of the sampling rate). Defaults to 1.
-
+
Returns
-------
f : ndarray
@@ -172,11 +172,11 @@ def fftfreq(n, d=1.0):
def rfftfreq(n, d=1.0):
"""
- Return the Discrete Fourier Transform sample frequencies
+ Return the Discrete Fourier Transform sample frequencies
(for usage with rfft, irfft).
- The returned float array `f` contains the frequency bin centers in cycles
- per unit of the sample spacing (with zero at the start). For instance, if
+ The returned float array `f` contains the frequency bin centers in cycles
+ per unit of the sample spacing (with zero at the start). For instance, if
the sample spacing is in seconds, then the frequency unit is cycles/second.
Given a window length `n` and a sample spacing `d`::
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index ca3d60869..b2ea5e965 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -657,7 +657,7 @@ def fill_diagonal(a, val, wrap=False):
Value to be written on the diagonal, its type must be compatible with
that of the array a.
- wrap : bool
+ wrap : bool
For tall matrices in NumPy version up to 1.6.2, the
diagonal "wrapped" after N columns. You can have this behavior
with this option. This affect only tall matrices.
diff --git a/numpy/lib/tests/test_index_tricks.py b/numpy/lib/tests/test_index_tricks.py
index 32b3c7036..01b705b5d 100644
--- a/numpy/lib/tests/test_index_tricks.py
+++ b/numpy/lib/tests/test_index_tricks.py
@@ -256,7 +256,7 @@ def test_ndindex():
assert_equal(x, [()])
x = list(np.ndindex(()))
- assert_equal(x, [()])
+ assert_equal(x, [()])
if __name__ == "__main__":
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index da9e13847..d52ad095d 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -603,4 +603,3 @@ def common_type(*arrays):
return array_type[1][precision]
else:
return array_type[0][precision]
-
diff --git a/numpy/lib/user_array.py b/numpy/lib/user_array.py
index d675d3702..cc9612427 100644
--- a/numpy/lib/user_array.py
+++ b/numpy/lib/user_array.py
@@ -12,7 +12,7 @@ from numpy.core import (
bitwise_xor, invert, less, less_equal, not_equal, equal, greater,
greater_equal, shape, reshape, arange, sin, sqrt, transpose
)
-from numpy.compat import long
+from numpy.compat import long
class container(object):
def __init__(self, data, dtype=None, copy=True):
diff --git a/numpy/linalg/_gufuncs_linalg.py b/numpy/linalg/_gufuncs_linalg.py
index 169d39f86..ef19c2121 100644
--- a/numpy/linalg/_gufuncs_linalg.py
+++ b/numpy/linalg/_gufuncs_linalg.py
@@ -15,7 +15,7 @@ as the iteration used when used on vectors. This can result in faster
execution as well.
In addition, there are some ufuncs thrown in that implement fused operations
-over numpy vectors that can result in faster execution on large vector
+over numpy vectors that can result in faster execution on large vector
compared to non-fused versions (for example: multiply_add, multiply3).
In fact, gufuncs_linalg is a very thin wrapper of python code that wraps
@@ -73,9 +73,9 @@ Fused Operations
Error Handling
================
Unlike the numpy.linalg module, this module does not use exceptions to notify
-errors in the execution of the kernels. As these functions are thougth to be
+errors in the execution of the kernels. As these functions are thougth to be
used in a vector way it didn't seem appropriate to raise exceptions on failure
-of an element. So instead, when an error computing an element occurs its
+of an element. So instead, when an error computing an element occurs its
associated result will be set to an invalid value (all NaNs).
Exceptions can occur if the arguments fail to map properly to the underlying
@@ -91,7 +91,7 @@ That's not always the case, as due to limitations of the gufunc interface some
functions cannot be mapped straight into a kernel.
Two cases come to mind:
-- An uniform parameter is needed to configure the way the computation is
+- An uniform parameter is needed to configure the way the computation is
performed (like UPLO in the functions working on symmetric/hermitian matrices)
- svd, where it was impossible to map the function to a gufunc signature.
@@ -114,9 +114,9 @@ from __future__ import division, absolute_import, print_function
__all__ = ['inner1d', 'dotc1d', 'innerwt', 'matrix_multiply', 'det', 'slogdet',
- 'inv', 'cholesky', 'quadratic_form', 'add3', 'multiply3',
- 'multiply3_add', 'multiply_add', 'multiply_add2', 'multiply4',
- 'multiply4_add', 'eig', 'eigvals', 'eigh', 'eigvalsh', 'solve',
+ 'inv', 'cholesky', 'quadratic_form', 'add3', 'multiply3',
+ 'multiply3_add', 'multiply_add', 'multiply_add2', 'multiply4',
+ 'multiply4_add', 'eig', 'eigvals', 'eigh', 'eigvalsh', 'solve',
'svd', 'chosolve', 'poinv']
import numpy as np
@@ -354,7 +354,7 @@ def slogdet(a, **kwargs):
Compute the sign and (natural) logarithm of the determinant of an array,
with broadcasting.
- If an array has a very small or very large determinant, then a call to
+ If an array has a very small or very large determinant, then a call to
`det` may overflow or underflow. This routine is more robust against such
issues, because it computes the logarithm of the determinant rather than
the determinant itself
@@ -368,7 +368,7 @@ def slogdet(a, **kwargs):
-------
sign : (...) array
An array of numbers representing the sign of the determinants. For real
- matrices, this is 1, 0, or -1. For complex matrices, this is a complex
+ matrices, this is 1, 0, or -1. For complex matrices, this is a complex
number with absolute value 1 (i.e., it is on the unit circle), or else
0.
logdet : (...) array
@@ -1398,11 +1398,11 @@ def chosolve(A, B, UPLO='L', **kw_args):
def poinv(A, UPLO='L', **kw_args):
"""
- Compute the (multiplicative) inverse of symmetric/hermitian positive
+ Compute the (multiplicative) inverse of symmetric/hermitian positive
definite matrices, with broadcasting.
- Given a square symmetic/hermitian positive-definite matrix `a`, return
- the matrix `ainv` satisfying ``matrix_multiply(a, ainv) =
+ Given a square symmetic/hermitian positive-definite matrix `a`, return
+ the matrix `ainv` satisfying ``matrix_multiply(a, ainv) =
matrix_multiply(ainv, a) = Identity matrix``.
Parameters
diff --git a/numpy/linalg/lapack_lite/blas_lite.c b/numpy/linalg/lapack_lite/blas_lite.c
index bd24768c3..3ac680167 100644
--- a/numpy/linalg/lapack_lite/blas_lite.c
+++ b/numpy/linalg/lapack_lite/blas_lite.c
@@ -21132,4 +21132,3 @@ L20:
/* End of ZTRSV . */
} /* ztrsv_ */
-
diff --git a/numpy/linalg/lapack_lite/dlamch.c b/numpy/linalg/lapack_lite/dlamch.c
index bf1dfdb05..fd2d58ad7 100644
--- a/numpy/linalg/lapack_lite/dlamch.c
+++ b/numpy/linalg/lapack_lite/dlamch.c
@@ -5,49 +5,49 @@
#ifndef HAVE_CONFIG
doublereal dlamch_(char *cmach)
{
-/* -- LAPACK auxiliary routine (version 3.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
-
-
- Purpose
- =======
-
- DLAMCH determines double precision machine parameters.
-
- Arguments
- =========
-
- CMACH (input) CHARACTER*1
- Specifies the value to be returned by DLAMCH:
- = 'E' or 'e', DLAMCH := eps
- = 'S' or 's , DLAMCH := sfmin
- = 'B' or 'b', DLAMCH := base
- = 'P' or 'p', DLAMCH := eps*base
- = 'N' or 'n', DLAMCH := t
- = 'R' or 'r', DLAMCH := rnd
- = 'M' or 'm', DLAMCH := emin
- = 'U' or 'u', DLAMCH := rmin
- = 'L' or 'l', DLAMCH := emax
- = 'O' or 'o', DLAMCH := rmax
-
- where
-
- eps = relative machine precision
- sfmin = safe minimum, such that 1/sfmin does not overflow
- base = base of the machine
- prec = eps*base
- t = number of (base) digits in the mantissa
- rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
- emin = minimum exponent before (gradual) underflow
- rmin = underflow threshold - base**(emin-1)
- emax = largest exponent before overflow
- rmax = overflow threshold - (base**emax)*(1-eps)
-
- =====================================================================
+/* -- LAPACK auxiliary routine (version 3.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMCH determines double precision machine parameters.
+
+ Arguments
+ =========
+
+ CMACH (input) CHARACTER*1
+ Specifies the value to be returned by DLAMCH:
+ = 'E' or 'e', DLAMCH := eps
+ = 'S' or 's , DLAMCH := sfmin
+ = 'B' or 'b', DLAMCH := base
+ = 'P' or 'p', DLAMCH := eps*base
+ = 'N' or 'n', DLAMCH := t
+ = 'R' or 'r', DLAMCH := rnd
+ = 'M' or 'm', DLAMCH := emin
+ = 'U' or 'u', DLAMCH := rmin
+ = 'L' or 'l', DLAMCH := emax
+ = 'O' or 'o', DLAMCH := rmax
+
+ where
+
+ eps = relative machine precision
+ sfmin = safe minimum, such that 1/sfmin does not overflow
+ base = base of the machine
+ prec = eps*base
+ t = number of (base) digits in the mantissa
+ rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+ emin = minimum exponent before (gradual) underflow
+ rmin = underflow threshold - base**(emin-1)
+ emax = largest exponent before overflow
+ rmax = overflow threshold - (base**emax)*(1-eps)
+
+ =====================================================================
*/
-/* >>Start of File<<
+/* >>Start of File<<
Initialized data */
static logical first = TRUE_;
/* System generated locals */
@@ -64,7 +64,7 @@ doublereal dlamch_(char *cmach)
static doublereal rmin, rmax, t, rmach;
extern logical lsame_(char *, char *);
static doublereal small, sfmin;
- extern /* Subroutine */ int dlamc2_(integer *, integer *, logical *,
+ extern /* Subroutine */ int dlamc2_(integer *, integer *, logical *,
doublereal *, integer *, doublereal *, integer *, doublereal *);
static integer it;
static doublereal rnd, eps;
@@ -93,7 +93,7 @@ doublereal dlamch_(char *cmach)
if (small >= sfmin) {
/* Use SMALL plus a bit, to avoid the possibility of rou
-nding
+nding
causing overflow when computing 1/sfmin. */
sfmin = small * (eps + 1.);
@@ -130,56 +130,56 @@ nding
} /* dlamch_ */
-/* Subroutine */ int dlamc1_(integer *beta, integer *t, logical *rnd, logical
+/* Subroutine */ int dlamc1_(integer *beta, integer *t, logical *rnd, logical
*ieee1)
{
-/* -- LAPACK auxiliary routine (version 3.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
+/* -- LAPACK auxiliary routine (version 3.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
- Purpose
- =======
+ Purpose
+ =======
- DLAMC1 determines the machine parameters given by BETA, T, RND, and
- IEEE1.
+ DLAMC1 determines the machine parameters given by BETA, T, RND, and
+ IEEE1.
- Arguments
- =========
+ Arguments
+ =========
- BETA (output) INTEGER
- The base of the machine.
+ BETA (output) INTEGER
+ The base of the machine.
- T (output) INTEGER
- The number of ( BETA ) digits in the mantissa.
+ T (output) INTEGER
+ The number of ( BETA ) digits in the mantissa.
- RND (output) LOGICAL
- Specifies whether proper rounding ( RND = .TRUE. ) or
- chopping ( RND = .FALSE. ) occurs in addition. This may not
-
- be a reliable guide to the way in which the machine performs
-
- its arithmetic.
+ RND (output) LOGICAL
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
- IEEE1 (output) LOGICAL
- Specifies whether rounding appears to be done in the IEEE
- 'round to nearest' style.
+ be a reliable guide to the way in which the machine performs
- Further Details
- ===============
+ its arithmetic.
- The routine is based on the routine ENVRON by Malcolm and
- incorporates suggestions by Gentleman and Marovich. See
+ IEEE1 (output) LOGICAL
+ Specifies whether rounding appears to be done in the IEEE
+ 'round to nearest' style.
- Malcolm M. A. (1972) Algorithms to reveal properties of
- floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+ Further Details
+ ===============
- Gentleman W. M. and Marovich S. B. (1974) More on algorithms
- that reveal properties of floating point arithmetic units.
- Comms. of the ACM, 17, 276-277.
+ The routine is based on the routine ENVRON by Malcolm and
+ incorporates suggestions by Gentleman and Marovich. See
- =====================================================================
+ Malcolm M. A. (1972) Algorithms to reveal properties of
+ floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+
+ Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+ that reveal properties of floating point arithmetic units.
+ Comms. of the ACM, 17, 276-277.
+
+ =====================================================================
*/
/* Initialized data */
static logical first = TRUE_;
@@ -203,18 +203,18 @@ nding
one = 1.;
/* LBETA, LIEEE1, LT and LRND are the local values of BE
-TA,
- IEEE1, T and RND.
+TA,
+ IEEE1, T and RND.
Throughout this routine we use the function DLAMC3 to ens
-ure
- that relevant values are stored and not held in registers,
- or
- are not affected by optimizers.
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
Compute a = 2.0**m with the smallest positive integer m s
-uch
- that
+uch
+ that
fl( a + 1.0 ) = a. */
@@ -230,11 +230,11 @@ L10:
c = dlamc3_(&c, &d__1);
goto L10;
}
-/* + END WHILE
+/* + END WHILE
- Now compute b = 2.0**m with the smallest positive integer
-m
- such that
+ Now compute b = 2.0**m with the smallest positive integer
+m
+ such that
fl( a + b ) .gt. a. */
@@ -248,14 +248,14 @@ L20:
c = dlamc3_(&a, &b);
goto L20;
}
-/* + END WHILE
+/* + END WHILE
Now compute the base. a and c are neighbouring floating po
-int
+int
numbers in the interval ( beta**t, beta**( t + 1 ) ) and
- so
+ so
their difference is beta. Adding 0.25 to c is to ensure that
- it
+ it
is truncated to beta and not ( beta - 1 ). */
qtr = one / 4;
@@ -265,8 +265,8 @@ int
lbeta = (integer) (c + qtr);
/* Now determine whether rounding or chopping occurs, by addin
-g a
- bit less than beta/2 and a bit more than beta/2 to
+g a
+ bit less than beta/2 and a bit more than beta/2 to
a. */
b = (doublereal) lbeta;
@@ -288,13 +288,13 @@ g a
}
/* Try and decide whether rounding is done in the IEEE 'round
- to
- nearest' style. B/2 is half a unit in the last place of the
-two
- numbers A and SAVEC. Furthermore, A is even, i.e. has last
-bit
+ to
+ nearest' style. B/2 is half a unit in the last place of the
+two
+ numbers A and SAVEC. Furthermore, A is even, i.e. has last
+bit
zero, and SAVEC is odd. Thus adding B/2 to A should not cha
-nge
+nge
A, but adding B/2 to SAVEC should change SAVEC. */
d__1 = b / 2;
@@ -304,12 +304,12 @@ nge
lieee1 = t1 == a && t2 > savec && lrnd;
/* Now find the mantissa, t. It should be the integer part
- of
+ of
log to the base beta of a, however it is safer to determine
- t
- by powering. So we find t as the smallest positive integer
-for
- which
+ t
+ by powering. So we find t as the smallest positive integer
+for
+ which
fl( beta**t + 1.0 ) = 1.0. */
@@ -342,73 +342,73 @@ L30:
} /* dlamc1_ */
-/* Subroutine */ int dlamc2_(integer *beta, integer *t, logical *rnd,
- doublereal *eps, integer *emin, doublereal *rmin, integer *emax,
+/* Subroutine */ int dlamc2_(integer *beta, integer *t, logical *rnd,
+ doublereal *eps, integer *emin, doublereal *rmin, integer *emax,
doublereal *rmax)
{
-/* -- LAPACK auxiliary routine (version 3.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
+/* -- LAPACK auxiliary routine (version 3.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+
+ DLAMC2 determines the machine parameters specified in its argument
+ list.
+ Arguments
+ =========
- Purpose
- =======
+ BETA (output) INTEGER
+ The base of the machine.
- DLAMC2 determines the machine parameters specified in its argument
- list.
+ T (output) INTEGER
+ The number of ( BETA ) digits in the mantissa.
- Arguments
- =========
+ RND (output) LOGICAL
+ Specifies whether proper rounding ( RND = .TRUE. ) or
+ chopping ( RND = .FALSE. ) occurs in addition. This may not
- BETA (output) INTEGER
- The base of the machine.
+ be a reliable guide to the way in which the machine performs
- T (output) INTEGER
- The number of ( BETA ) digits in the mantissa.
+ its arithmetic.
- RND (output) LOGICAL
- Specifies whether proper rounding ( RND = .TRUE. ) or
- chopping ( RND = .FALSE. ) occurs in addition. This may not
-
- be a reliable guide to the way in which the machine performs
-
- its arithmetic.
+ EPS (output) DOUBLE PRECISION
+ The smallest positive number such that
- EPS (output) DOUBLE PRECISION
- The smallest positive number such that
+ fl( 1.0 - EPS ) .LT. 1.0,
- fl( 1.0 - EPS ) .LT. 1.0,
+ where fl denotes the computed value.
- where fl denotes the computed value.
+ EMIN (output) INTEGER
+ The minimum exponent before (gradual) underflow occurs.
- EMIN (output) INTEGER
- The minimum exponent before (gradual) underflow occurs.
+ RMIN (output) DOUBLE PRECISION
+ The smallest normalized number for the machine, given by
+ BASE**( EMIN - 1 ), where BASE is the floating point value
- RMIN (output) DOUBLE PRECISION
- The smallest normalized number for the machine, given by
- BASE**( EMIN - 1 ), where BASE is the floating point value
-
- of BETA.
+ of BETA.
- EMAX (output) INTEGER
- The maximum exponent before overflow occurs.
+ EMAX (output) INTEGER
+ The maximum exponent before overflow occurs.
- RMAX (output) DOUBLE PRECISION
- The largest positive number for the machine, given by
- BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
-
- value of BETA.
+ RMAX (output) DOUBLE PRECISION
+ The largest positive number for the machine, given by
+ BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
- Further Details
- ===============
+ value of BETA.
- The computation of EPS is based on a routine PARANOIA by
- W. Kahan of the University of California at Berkeley.
+ Further Details
+ ===============
- =====================================================================
+ The computation of EPS is based on a routine PARANOIA by
+ W. Kahan of the University of California at Berkeley.
+
+ =====================================================================
*/
-
+
/* Initialized data */
static logical first = TRUE_;
static logical iwarn = FALSE_;
@@ -428,12 +428,12 @@ L30:
static doublereal small;
static integer gpmin;
static doublereal third, lrmin, lrmax, sixth;
- extern /* Subroutine */ int dlamc1_(integer *, integer *, logical *,
+ extern /* Subroutine */ int dlamc1_(integer *, integer *, logical *,
logical *);
extern doublereal dlamc3_(doublereal *, doublereal *);
static logical lieee1;
- extern /* Subroutine */ int dlamc4_(integer *, doublereal *, integer *),
- dlamc5_(integer *, integer *, integer *, logical *, integer *,
+ extern /* Subroutine */ int dlamc4_(integer *, doublereal *, integer *),
+ dlamc5_(integer *, integer *, integer *, logical *, integer *,
doublereal *);
static integer lt, ngnmin, ngpmin;
static doublereal one, two;
@@ -447,16 +447,16 @@ L30:
two = 2.;
/* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values
- of
- BETA, T, RND, EPS, EMIN and RMIN.
+ of
+ BETA, T, RND, EPS, EMIN and RMIN.
Throughout this routine we use the function DLAMC3 to ens
-ure
- that relevant values are stored and not held in registers,
- or
- are not affected by optimizers.
+ure
+ that relevant values are stored and not held in registers,
+ or
+ are not affected by optimizers.
- DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
+ DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1.
*/
dlamc1_(&lbeta, &lt, &lrnd, &lieee1);
@@ -511,12 +511,12 @@ L10:
leps = a;
}
-/* Computation of EPS complete.
+/* Computation of EPS complete.
Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3
-)).
+)).
Keep dividing A by BETA until (gradual) underflow occurs. T
-his
+his
is detected when we cannot recover the previous A. */
rbase = one / lbeta;
@@ -539,13 +539,13 @@ his
if (ngpmin == gpmin) {
lemin = ngpmin;
/* ( Non twos-complement machines, no gradual under
-flow;
+flow;
e.g., VAX ) */
} else if (gpmin - ngpmin == 3) {
lemin = ngpmin - 1 + lt;
ieee = TRUE_;
/* ( Non twos-complement machines, with gradual und
-erflow;
+erflow;
e.g., IEEE standard followers ) */
} else {
lemin = min(ngpmin,gpmin);
@@ -557,7 +557,7 @@ erflow;
if ((i__1 = ngpmin - ngnmin, abs(i__1)) == 1) {
lemin = max(ngpmin,ngnmin);
/* ( Twos-complement machines, no gradual underflow
-;
+;
e.g., CYBER 205 ) */
} else {
lemin = min(ngpmin,ngnmin);
@@ -570,7 +570,7 @@ erflow;
if (gpmin - min(ngpmin,ngnmin) == 3) {
lemin = max(ngpmin,ngnmin) - 1 + lt;
/* ( Twos-complement machines with gradual underflo
-w;
+w;
no known machine ) */
} else {
lemin = min(ngpmin,ngnmin);
@@ -585,33 +585,33 @@ w;
/* ( A guess; no known machine ) */
iwarn = TRUE_;
}
-/* **
+/* **
Comment out this if block if EMIN is ok */
if (iwarn) {
first = TRUE_;
printf("\n\n WARNING. The value EMIN may be incorrect:- ");
printf("EMIN = %8i\n",lemin);
printf("If, after inspection, the value EMIN looks acceptable");
- printf("please comment out \n the IF block as marked within the");
- printf("code of routine DLAMC2, \n otherwise supply EMIN");
+ printf("please comment out \n the IF block as marked within the");
+ printf("code of routine DLAMC2, \n otherwise supply EMIN");
printf("explicitly.\n");
}
-/* **
+/* **
Assume IEEE arithmetic if we found denormalised numbers abo
-ve,
+ve,
or if arithmetic seems to round in the IEEE style, determi
-ned
+ned
in routine DLAMC1. A true IEEE machine should have both thi
-ngs
+ngs
true; however, faulty machines may have one or the other. */
ieee = ieee || lieee1;
/* Compute RMIN by successive division by BETA. We could comp
-ute
+ute
RMIN as BASE**( EMIN - 1 ), but some machines underflow dur
-ing
+ing
this computation. */
lrmin = 1.;
@@ -647,30 +647,30 @@ ing
doublereal dlamc3_(doublereal *a, doublereal *b)
{
-/* -- LAPACK auxiliary routine (version 3.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
+/* -- LAPACK auxiliary routine (version 3.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+ DLAMC3 is intended to force A and B to be stored prior to doing
- Purpose
- =======
+ the addition of A and B , for use in situations where optimizers
- DLAMC3 is intended to force A and B to be stored prior to doing
-
- the addition of A and B , for use in situations where optimizers
-
- might hold one of these in a register.
+ might hold one of these in a register.
- Arguments
- =========
+ Arguments
+ =========
- A, B (input) DOUBLE PRECISION
- The values A and B.
+ A, B (input) DOUBLE PRECISION
+ The values A and B.
- =====================================================================
+ =====================================================================
*/
-/* >>Start of File<<
+/* >>Start of File<<
System generated locals */
volatile doublereal ret_val;
@@ -688,33 +688,33 @@ doublereal dlamc3_(doublereal *a, doublereal *b)
#ifndef HAVE_CONFIG
/* Subroutine */ int dlamc4_(integer *emin, doublereal *start, integer *base)
{
-/* -- LAPACK auxiliary routine (version 2.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
+/* -- LAPACK auxiliary routine (version 2.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
- Purpose
- =======
+ Purpose
+ =======
- DLAMC4 is a service routine for DLAMC2.
+ DLAMC4 is a service routine for DLAMC2.
- Arguments
- =========
+ Arguments
+ =========
- EMIN (output) EMIN
- The minimum exponent before (gradual) underflow, computed by
-
- setting A = START and dividing by BASE until the previous A
- can not be recovered.
+ EMIN (output) EMIN
+ The minimum exponent before (gradual) underflow, computed by
- START (input) DOUBLE PRECISION
- The starting point for determining EMIN.
+ setting A = START and dividing by BASE until the previous A
+ can not be recovered.
- BASE (input) INTEGER
- The base of the machine.
+ START (input) DOUBLE PRECISION
+ The starting point for determining EMIN.
- =====================================================================
+ BASE (input) INTEGER
+ The base of the machine.
+
+ =====================================================================
*/
/* System generated locals */
integer i__1;
@@ -739,7 +739,7 @@ doublereal dlamc3_(doublereal *a, doublereal *b)
c2 = a;
d1 = a;
d2 = a;
-/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
+/* + WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND.
$ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP */
L10:
if (c1 == a && c2 == a && d1 == a && d2 == a) {
@@ -776,60 +776,60 @@ L10:
} /* dlamc4_ */
-/* Subroutine */ int dlamc5_(integer *beta, integer *p, integer *emin,
+/* Subroutine */ int dlamc5_(integer *beta, integer *p, integer *emin,
logical *ieee, integer *emax, doublereal *rmax)
{
-/* -- LAPACK auxiliary routine (version 3.0) --
- Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
- Courant Institute, Argonne National Lab, and Rice University
- October 31, 1992
+/* -- LAPACK auxiliary routine (version 3.0) --
+ Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+ Courant Institute, Argonne National Lab, and Rice University
+ October 31, 1992
+
+
+ Purpose
+ =======
+ DLAMC5 attempts to compute RMAX, the largest machine floating-point
+ number, without overflow. It assumes that EMAX + abs(EMIN) sum
+ approximately to a power of 2. It will fail on machines where this
+ assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
- Purpose
- =======
+ EMAX = 28718). It will also fail if the value supplied for EMIN is
+ too large (i.e. too close to zero), probably with overflow.
- DLAMC5 attempts to compute RMAX, the largest machine floating-point
- number, without overflow. It assumes that EMAX + abs(EMIN) sum
- approximately to a power of 2. It will fail on machines where this
- assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
-
- EMAX = 28718). It will also fail if the value supplied for EMIN is
- too large (i.e. too close to zero), probably with overflow.
+ Arguments
+ =========
- Arguments
- =========
+ BETA (input) INTEGER
+ The base of floating-point arithmetic.
- BETA (input) INTEGER
- The base of floating-point arithmetic.
+ P (input) INTEGER
+ The number of base BETA digits in the mantissa of a
+ floating-point value.
- P (input) INTEGER
- The number of base BETA digits in the mantissa of a
- floating-point value.
+ EMIN (input) INTEGER
+ The minimum exponent before (gradual) underflow.
- EMIN (input) INTEGER
- The minimum exponent before (gradual) underflow.
+ IEEE (input) LOGICAL
+ A logical flag specifying whether or not the arithmetic
+ system is thought to comply with the IEEE standard.
- IEEE (input) LOGICAL
- A logical flag specifying whether or not the arithmetic
- system is thought to comply with the IEEE standard.
+ EMAX (output) INTEGER
+ The largest exponent before overflow
- EMAX (output) INTEGER
- The largest exponent before overflow
+ RMAX (output) DOUBLE PRECISION
+ The largest machine floating-point number.
- RMAX (output) DOUBLE PRECISION
- The largest machine floating-point number.
+ =====================================================================
- =====================================================================
-
- First compute LEXP and UEXP, two powers of 2 that bound
- abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
- approximately to the bound that is closest to abs(EMIN).
+ First compute LEXP and UEXP, two powers of 2 that bound
+ abs(EMIN). We then assume that EMAX + abs(EMIN) will sum
+ approximately to the bound that is closest to abs(EMIN).
(EMAX is the exponent of the required number RMAX). */
/* Table of constant values */
static doublereal c_b5 = 0.;
-
+
/* System generated locals */
integer i__1;
doublereal d__1;
@@ -861,8 +861,8 @@ L10:
++exbits;
}
-/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
- than or equal to EMIN. EXBITS is the number of bits needed to
+/* Now -LEXP is less than or equal to EMIN, and -UEXP is greater
+ than or equal to EMIN. EXBITS is the number of bits needed to
store the exponent. */
if (uexp + *emin > -lexp - *emin) {
@@ -871,32 +871,32 @@ L10:
expsum = uexp << 1;
}
-/* EXPSUM is the exponent range, approximately equal to
+/* EXPSUM is the exponent range, approximately equal to
EMAX - EMIN + 1 . */
*emax = expsum + *emin - 1;
nbits = exbits + 1 + *p;
-/* NBITS is the total number of bits needed to store a
+/* NBITS is the total number of bits needed to store a
floating-point number. */
if (nbits % 2 == 1 && *beta == 2) {
-/* Either there are an odd number of bits used to store a
- floating-point number, which is unlikely, or some bits are
-
+/* Either there are an odd number of bits used to store a
+ floating-point number, which is unlikely, or some bits are
+
not used in the representation of numbers, which is possible
-,
- (e.g. Cray machines) or the mantissa has an implicit bit,
+,
+ (e.g. Cray machines) or the mantissa has an implicit bit,
(e.g. IEEE machines, Dec Vax machines), which is perhaps the
-
- most likely. We have to assume the last alternative.
- If this is true, then we need to reduce EMAX by one because
-
+
+ most likely. We have to assume the last alternative.
+ If this is true, then we need to reduce EMAX by one because
+
there must be some way of representing zero in an implicit-b
-it
- system. On machines like Cray, we are reducing EMAX by one
-
+it
+ system. On machines like Cray, we are reducing EMAX by one
+
unnecessarily. */
--(*emax);
@@ -905,16 +905,16 @@ it
if (*ieee) {
/* Assume we are on an IEEE machine which reserves one exponent
-
+
for infinity and NaN. */
--(*emax);
}
-/* Now create RMAX, the largest machine number, which should
- be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
+/* Now create RMAX, the largest machine number, which should
+ be equal to (1.0 - BETA**(-P)) * BETA**EMAX .
- First compute 1.0 - BETA**(-P), being careful that the
+ First compute 1.0 - BETA**(-P), being careful that the
result is less than 1.0 . */
recbas = 1. / *beta;
diff --git a/numpy/linalg/lapack_lite/dlapack_lite.c b/numpy/linalg/lapack_lite/dlapack_lite.c
index 6a36fe6a8..6b65397bd 100644
--- a/numpy/linalg/lapack_lite/dlapack_lite.c
+++ b/numpy/linalg/lapack_lite/dlapack_lite.c
@@ -100830,4 +100830,3 @@ L250:
/* End of STRTRI */
} /* strtri_ */
-
diff --git a/numpy/linalg/lapack_lite/zlapack_lite.c b/numpy/linalg/lapack_lite/zlapack_lite.c
index 1b43c6270..e6b03429b 100644
--- a/numpy/linalg/lapack_lite/zlapack_lite.c
+++ b/numpy/linalg/lapack_lite/zlapack_lite.c
@@ -27003,4 +27003,3 @@ L130:
/* End of ZUNMTR */
} /* zunmtr_ */
-
diff --git a/numpy/linalg/setup.py b/numpy/linalg/setup.py
index 1c73c86d3..c60ff268f 100644
--- a/numpy/linalg/setup.py
+++ b/numpy/linalg/setup.py
@@ -15,9 +15,9 @@ def configuration(parent_package='',top_path=None):
src_dir = 'lapack_lite'
lapack_lite_src = [
os.path.join(src_dir, 'python_xerbla.c'),
- os.path.join(src_dir, 'zlapack_lite.c'),
+ os.path.join(src_dir, 'zlapack_lite.c'),
os.path.join(src_dir, 'dlapack_lite.c'),
- os.path.join(src_dir, 'blas_lite.c'),
+ os.path.join(src_dir, 'blas_lite.c'),
os.path.join(src_dir, 'dlamch.c'),
os.path.join(src_dir, 'f2c_lite.c'),
os.path.join(src_dir, 'f2c.h'),
diff --git a/numpy/linalg/tests/test_gufuncs_linalg.py b/numpy/linalg/tests/test_gufuncs_linalg.py
index d3299b7b5..c930ecff8 100644
--- a/numpy/linalg/tests/test_gufuncs_linalg.py
+++ b/numpy/linalg/tests/test_gufuncs_linalg.py
@@ -134,7 +134,7 @@ class MatrixGenerator(object):
[2,1]]
return a, b
-
+
def real_symmetric_matrices(self):
a = [[ 2 ,-1],
[-1 , 2]]
@@ -159,7 +159,7 @@ class MatrixGenerator(object):
b = [[4+3j,3+2j],
[2-1j,1+0j]]
-
+
return a, b
def real_matrices_vector(self):
@@ -329,15 +329,15 @@ class TestDet(GeneralTestCase, TestCase):
assert_equal(gula.slogdet(array([[0.0]], dtype=cdouble)), (0.0, -inf))
def test_types(self):
- for typ in [(single, single),
- (double, double),
+ for typ in [(single, single),
+ (double, double),
(csingle, single),
(cdouble, double)]:
for x in [ [0], [[0]], [[[0]]] ]:
assert_equal(gula.det(array(x, dtype=typ[0])).dtype, typ[0])
assert_equal(gula.slogdet(array(x, dtype=typ[0]))[0].dtype, typ[0])
assert_equal(gula.slogdet(array(x, dtype=typ[0]))[1].dtype, typ[1])
-
+
class TestEig(GeneralTestCase, TestCase):
def do(self, a, b):
@@ -377,7 +377,7 @@ class TestSolve(GeneralTestCase,TestCase):
class TestChosolve(HermitianTestCase, TestCase):
def do(self, a, b):
- """
+ """
inner1d not defined for complex types.
todo: implement alternative test
"""
@@ -427,7 +427,7 @@ class UfuncTestCase(object):
parameter = self.__class__.parameter
a = np.array([parameter, parameter], dtype=typ)
self.do(a)
-
+
def test_single(self):
self._check_for_type(single)
diff --git a/numpy/linalg/umath_linalg.c.src b/numpy/linalg/umath_linalg.c.src
index c5303a077..5e75a6419 100644
--- a/numpy/linalg/umath_linalg.c.src
+++ b/numpy/linalg/umath_linalg.c.src
@@ -1056,7 +1056,7 @@ static void
#TYPE=FLOAT,DOUBLE,CFLOAT,CDOUBLE#
#typ=npy_float,npy_double,COMPLEX_t,DOUBLECOMPLEX_t#
#add=FLOAT_add,DOUBLE_add,CFLOAT_add,CDOUBLE_add#
- #mul=FLOAT_mul,DOUBLE_mul,CFLOAT_mul,CDOUBLE_mul#
+ #mul=FLOAT_mul,DOUBLE_mul,CFLOAT_mul,CDOUBLE_mul#
#zero=s_zero, d_zero,c_zero,z_zero#
*/
@@ -2483,7 +2483,7 @@ init_@lapack_func@(GEEV_PARAMS_t* params,
@typ@ work_size_query;
fortran_int do_size_query = -1;
fortran_int rv;
- size_t total_size = a_size + w_size + vl_size + vr_size + rwork_size;
+ size_t total_size = a_size + w_size + vl_size + vr_size + rwork_size;
mem_buff = malloc(total_size);
if (!mem_buff)
@@ -3860,7 +3860,7 @@ static char eigh_types[] = {
static char eighvals_types[] = {
NPY_FLOAT, NPY_FLOAT,
NPY_DOUBLE, NPY_DOUBLE,
- NPY_CFLOAT, NPY_FLOAT,
+ NPY_CFLOAT, NPY_FLOAT,
NPY_CDOUBLE, NPY_DOUBLE
};
@@ -3941,7 +3941,7 @@ GUFUNC_DESCRIPTOR_t gufunc_descriptors [] = {
},
{
"slogdet",
- "(m,m)->(),()",
+ "(m,m)->(),()",
"slogdet on the last two dimensions and broadcast on the rest. \n"\
"Results in two arrays, one with sign and the other with log of the"\
" determinants. \n"\
diff --git a/numpy/ma/API_CHANGES.txt b/numpy/ma/API_CHANGES.txt
index 7452eb5fa..a3d792a1f 100644
--- a/numpy/ma/API_CHANGES.txt
+++ b/numpy/ma/API_CHANGES.txt
@@ -61,7 +61,7 @@ Previously, ``putmask`` was used like this::
putmask(x,mask,[3])
which translated to::
-
+
x[~mask] = [3]
(Note that a ``True``-value in a mask suppresses a value.)
@@ -133,4 +133,3 @@ New features (non exhaustive list)
--------
The ``anom`` method returns the deviations from the average (anomalies).
-
diff --git a/numpy/ma/README.txt b/numpy/ma/README.txt
index e25c26485..a725b54c3 100644
--- a/numpy/ma/README.txt
+++ b/numpy/ma/README.txt
@@ -234,7 +234,3 @@ Revision notes
* 08/25/2007 : Creation of this page
* 01/23/2007 : The package has been moved to the SciPy sandbox, and is regularly updated: please check out your SVN version!
-
-
-
-
diff --git a/numpy/matrixlib/tests/test_regression.py b/numpy/matrixlib/tests/test_regression.py
index 27cff2c21..9831f8131 100644
--- a/numpy/matrixlib/tests/test_regression.py
+++ b/numpy/matrixlib/tests/test_regression.py
@@ -32,4 +32,3 @@ class TestRegression(TestCase):
x = np.asmatrix(np.random.uniform(0,1,(3,3)))
self.assertEqual(x.std().shape, ())
self.assertEqual(x.argmax().shape, ())
-
diff --git a/numpy/numarray/include/numpy/cfunc.h b/numpy/numarray/include/numpy/cfunc.h
index 1739290ae..1c03c2100 100644
--- a/numpy/numarray/include/numpy/cfunc.h
+++ b/numpy/numarray/include/numpy/cfunc.h
@@ -75,4 +75,3 @@ typedef struct {
CFUNC_DESCR(name, CFUNC_NSTRIDING, 0, 2, 1, 0, 0, 0, 0, 0, 0)
#endif
-
diff --git a/numpy/numarray/include/numpy/ieeespecial.h b/numpy/numarray/include/numpy/ieeespecial.h
index 0f3fff2a9..3d2afc0e1 100644
--- a/numpy/numarray/include/numpy/ieeespecial.h
+++ b/numpy/numarray/include/numpy/ieeespecial.h
@@ -121,4 +121,3 @@ typedef enum
#define MSK_NEG_ZERO BIT(NEG_ZERO_BIT)
#define MSK_INDETERM BIT(INDETERM_BIT)
#define MSK_BUG BIT(BUG_BIT)
-
diff --git a/numpy/oldnumeric/tests/test_regression.py b/numpy/oldnumeric/tests/test_regression.py
index b62a384e4..97c5126bc 100644
--- a/numpy/oldnumeric/tests/test_regression.py
+++ b/numpy/oldnumeric/tests/test_regression.py
@@ -9,4 +9,3 @@ class TestRegression(TestCase):
"""Ticket #552"""
from numpy.oldnumeric.random_array import randint
randint(0,50,[2,3])
-
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c
index d792cf86d..05f62f0cf 100644
--- a/numpy/random/mtrand/distributions.c
+++ b/numpy/random/mtrand/distributions.c
@@ -7,10 +7,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -21,9 +21,9 @@
*/
/* The implementations of rk_hypergeometric_hyp(), rk_hypergeometric_hrua(),
- * and rk_triangular() were adapted from Ivan Frohne's rv.py which has this
+ * and rk_triangular() were adapted from Ivan Frohne's rv.py which has this
* license:
- *
+ *
* Copyright 1998 by Ivan Frohne; Wasilla, Alaska, U.S.A.
* All Rights Reserved
*
@@ -52,8 +52,8 @@
#ifndef M_PI
#define M_PI 3.14159265358979323846264338328
-#endif
-/* log-gamma function to support some of these distributions. The
+#endif
+/* log-gamma function to support some of these distributions. The
* algorithm comes from SPECFUN by Shanjie Zhang and Jianming Jin and their
* book "Computation of Special Functions", 1996, John Wiley & Sons, Inc.
*/
@@ -62,7 +62,7 @@ double loggam(double x)
{
double x0, x2, xp, gl, gl0;
long k, n;
-
+
static double a[10] = {8.333333333333333e-02,-2.777777777777778e-03,
7.936507936507937e-04,-5.952380952380952e-04,
8.417508417508418e-04,-1.917526917526918e-03,
@@ -162,7 +162,7 @@ double rk_standard_gamma(rk_state *state, double shape)
{
do
{
- X = rk_gauss(state);
+ X = rk_gauss(state);
V = 1.0 + c*X;
} while (V <= 0.0);
@@ -225,7 +225,7 @@ double rk_noncentral_chisquare(rk_state *state, double df, double nonc)
double rk_f(rk_state *state, double dfnum, double dfden)
{
- return ((rk_chisquare(state, dfnum) * dfden) /
+ return ((rk_chisquare(state, dfnum) * dfden) /
(rk_chisquare(state, dfden) * dfnum));
}
@@ -241,7 +241,7 @@ long rk_binomial_btpe(rk_state *state, long n, double p)
double a,u,v,s,F,rho,t,A,nrq,x1,x2,f1,f2,z,z2,w,w2,x;
long m,y,k,i;
- if (!(state->has_binomial) ||
+ if (!(state->has_binomial) ||
(state->nsave != n) ||
(state->psave != p))
{
@@ -380,7 +380,7 @@ long rk_binomial_inversion(rk_state *state, long n, double p)
double q, qn, np, px, U;
long X, bound;
- if (!(state->has_binomial) ||
+ if (!(state->has_binomial) ||
(state->nsave != n) ||
(state->psave != p))
{
@@ -404,12 +404,12 @@ long rk_binomial_inversion(rk_state *state, long n, double p)
while (U > px)
{
X++;
- if (X > bound)
+ if (X > bound)
{
X = 0;
px = qn;
U = rk_double(state);
- } else
+ } else
{
U -= px;
px = ((n-X+1) * p * px)/(X*q);
@@ -514,7 +514,7 @@ long rk_poisson_ptrs(rk_state *state, double lam)
return k;
}
-
+
}
}
@@ -525,11 +525,11 @@ long rk_poisson(rk_state *state, double lam)
{
return rk_poisson_ptrs(state, lam);
}
- else if (lam == 0)
+ else if (lam == 0)
{
return 0;
}
- else
+ else
{
return rk_poisson_mult(state, lam);
}
@@ -551,7 +551,7 @@ double rk_standard_t(rk_state *state, double df)
}
/* Uses the rejection algorithm compared against the wrapped Cauchy
- distribution suggested by Best and Fisher and documented in
+ distribution suggested by Best and Fisher and documented in
Chapter 9 of Luc's Non-Uniform Random Variate Generation.
http://cg.scs.carleton.ca/~luc/rnbookindex.html
(but corrected to match the algorithm in R and Python)
@@ -600,7 +600,7 @@ double rk_vonmises(rk_state *state, double mu, double kappa)
if (neg)
{
mod *= -1;
- }
+ }
return mod;
}
@@ -624,12 +624,12 @@ double rk_power(rk_state *state, double a)
double rk_laplace(rk_state *state, double loc, double scale)
{
double U;
-
+
U = rk_double(state);
if (U < 0.5)
{
U = loc + scale * log(U + U);
- } else
+ } else
{
U = loc - scale * log(2.0 - U - U);
}
@@ -639,7 +639,7 @@ double rk_laplace(rk_state *state, double loc, double scale)
double rk_gumbel(rk_state *state, double loc, double scale)
{
double U;
-
+
U = 1.0 - rk_double(state);
return loc - scale * log(-log(U));
}
@@ -647,7 +647,7 @@ double rk_gumbel(rk_state *state, double loc, double scale)
double rk_logistic(rk_state *state, double loc, double scale)
{
double U;
-
+
U = rk_double(state);
return loc + scale * log(U/(1.0 - U));
}
@@ -666,7 +666,7 @@ double rk_wald(rk_state *state, double mean, double scale)
{
double U, X, Y;
double mu_2l;
-
+
mu_2l = mean / (2*scale);
Y = rk_gauss(state);
Y = mean*Y*Y;
@@ -710,7 +710,7 @@ long rk_geometric_search(rk_state *state, double p)
double U;
long X;
double sum, prod, q;
-
+
X = 1;
sum = prod = p;
q = 1.0 - p;
@@ -744,10 +744,10 @@ long rk_hypergeometric_hyp(rk_state *state, long good, long bad, long sample)
{
long d1, K, Z;
double d2, U, Y;
-
+
d1 = bad + good - sample;
d2 = (double)min(bad, good);
-
+
Y = d2;
K = sample;
while (Y > 0.0)
@@ -772,7 +772,7 @@ long rk_hypergeometric_hrua(rk_state *state, long good, long bad, long sample)
double d4, d5, d6, d7, d8, d10, d11;
long Z;
double T, W, X, Y;
-
+
mingoodbad = min(good, bad);
popsize = good + bad;
maxgoodbad = max(good, bad);
@@ -783,39 +783,39 @@ long rk_hypergeometric_hrua(rk_state *state, long good, long bad, long sample)
d7 = sqrt((popsize - m) * sample * d4 *d5 / (popsize-1) + 0.5);
d8 = D1*d7 + D2;
d9 = (long)floor((double)((m+1)*(mingoodbad+1))/(popsize+2));
- d10 = (loggam(d9+1) + loggam(mingoodbad-d9+1) + loggam(m-d9+1) +
+ d10 = (loggam(d9+1) + loggam(mingoodbad-d9+1) + loggam(m-d9+1) +
loggam(maxgoodbad-m+d9+1));
d11 = min(min(m, mingoodbad)+1.0, floor(d6+16*d7));
/* 16 for 16-decimal-digit precision in D1 and D2 */
-
+
while (1)
{
X = rk_double(state);
Y = rk_double(state);
W = d6 + d8*(Y- 0.5)/X;
-
+
/* fast rejection: */
if ((W < 0.0) || (W >= d11)) continue;
-
+
Z = (long)floor(W);
T = d10 - (loggam(Z+1) + loggam(mingoodbad-Z+1) + loggam(m-Z+1) +
loggam(maxgoodbad-m+Z+1));
-
+
/* fast acceptance: */
if ((X*(4.0-X)-3.0) <= T) break;
-
+
/* fast rejection: */
if (X*(X-T) >= 1) continue;
if (2.0*log(X) <= T) break; /* acceptance */
}
-
+
/* this is a correction to HRUA* by Ivan Frohne in rv.py */
if (good > bad) Z = m - Z;
-
+
/* another fix from rv.py to allow sample to exceed popsize/2 */
if (m < sample) Z = good - Z;
-
+
return Z;
}
#undef D1
@@ -836,20 +836,20 @@ double rk_triangular(rk_state *state, double left, double mode, double right)
{
double base, leftbase, ratio, leftprod, rightprod;
double U;
-
+
base = right - left;
leftbase = mode - left;
ratio = leftbase / base;
leftprod = leftbase*base;
rightprod = (right - mode)*base;
-
+
U = rk_double(state);
if (U <= ratio)
{
return left + sqrt(U*leftprod);
- } else
+ } else
{
- return right - sqrt((1.0 - U) * rightprod);
+ return right - sqrt((1.0 - U) * rightprod);
}
}
@@ -857,7 +857,7 @@ long rk_logseries(rk_state *state, double p)
{
double q, r, U, V;
long result;
-
+
r = log(1.0 - p);
while (1) {
diff --git a/numpy/random/mtrand/distributions.h b/numpy/random/mtrand/distributions.h
index 6f60a4ff3..0b42bc794 100644
--- a/numpy/random/mtrand/distributions.h
+++ b/numpy/random/mtrand/distributions.h
@@ -7,10 +7,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -30,11 +30,11 @@ extern "C" {
#endif
/* References:
- *
+ *
* Devroye, Luc. _Non-Uniform Random Variate Generation_.
* Springer-Verlag, New York, 1986.
* http://cgm.cs.mcgill.ca/~luc/rnbookindex.html
- *
+ *
* Kachitvichyanukul, V. and Schmeiser, B. W. Binomial Random Variate
* Generation. Communications of the ACM, 31, 2 (February, 1988) 216.
*
@@ -42,15 +42,15 @@ extern "C" {
* Variables. Insurance: Mathematics and Economics, (to appear)
* http://citeseer.csail.mit.edu/151115.html
*
- * Marsaglia, G. and Tsang, W. W. A Simple Method for Generating Gamma
+ * Marsaglia, G. and Tsang, W. W. A Simple Method for Generating Gamma
* Variables. ACM Transactions on Mathematical Software, Vol. 26, No. 3,
* September 2000, Pages 363–372.
*/
-
+
/* Normal distribution with mean=loc and standard deviation=scale. */
extern double rk_normal(rk_state *state, double loc, double scale);
-/* Standard exponential distribution (mean=1) computed by inversion of the
+/* Standard exponential distribution (mean=1) computed by inversion of the
* CDF. */
extern double rk_standard_exponential(rk_state *state);
@@ -60,10 +60,10 @@ extern double rk_exponential(rk_state *state, double scale);
/* Uniform distribution on interval [loc, loc+scale). */
extern double rk_uniform(rk_state *state, double loc, double scale);
-/* Standard gamma distribution with shape parameter.
+/* Standard gamma distribution with shape parameter.
* When shape < 1, the algorithm given by (Devroye p. 304) is used.
* When shape == 1, a Exponential variate is generated.
- * When shape > 1, the small and fast method of (Marsaglia and Tsang 2000)
+ * When shape > 1, the small and fast method of (Marsaglia and Tsang 2000)
* is used.
*/
extern double rk_standard_gamma(rk_state *state, double shape);
@@ -119,7 +119,7 @@ extern long rk_poisson_mult(rk_state *state, double lam);
/* Poisson distribution computer by the PTRS algorithm. */
extern long rk_poisson_ptrs(rk_state *state, double lam);
-/* Standard Cauchy distribution computed by dividing standard gaussians
+/* Standard Cauchy distribution computed by dividing standard gaussians
* (Devroye p. 451). */
extern double rk_standard_cauchy(rk_state *state);
diff --git a/numpy/random/mtrand/mtrand.c b/numpy/random/mtrand/mtrand.c
index b1c92e570..a508efba1 100644
--- a/numpy/random/mtrand/mtrand.c
+++ b/numpy/random/mtrand/mtrand.c
@@ -486,7 +486,7 @@ struct __pyx_obj_6mtrand_RandomState;
/* "mtrand.pyx":107
* long rk_logseries(rk_state *state, double p)
- *
+ *
* ctypedef double (* rk_cont0)(rk_state *state) # <<<<<<<<<<<<<<
* ctypedef double (* rk_cont1)(rk_state *state, double a)
* ctypedef double (* rk_cont2)(rk_state *state, double a, double b)
@@ -494,7 +494,7 @@ struct __pyx_obj_6mtrand_RandomState;
typedef double (*__pyx_t_6mtrand_rk_cont0)(rk_state *);
/* "mtrand.pyx":108
- *
+ *
* ctypedef double (* rk_cont0)(rk_state *state)
* ctypedef double (* rk_cont1)(rk_state *state, double a) # <<<<<<<<<<<<<<
* ctypedef double (* rk_cont2)(rk_state *state, double a, double b)
@@ -507,7 +507,7 @@ typedef double (*__pyx_t_6mtrand_rk_cont1)(rk_state *, double);
* ctypedef double (* rk_cont1)(rk_state *state, double a)
* ctypedef double (* rk_cont2)(rk_state *state, double a, double b) # <<<<<<<<<<<<<<
* ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c)
- *
+ *
*/
typedef double (*__pyx_t_6mtrand_rk_cont2)(rk_state *, double, double);
@@ -515,14 +515,14 @@ typedef double (*__pyx_t_6mtrand_rk_cont2)(rk_state *, double, double);
* ctypedef double (* rk_cont1)(rk_state *state, double a)
* ctypedef double (* rk_cont2)(rk_state *state, double a, double b)
* ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c) # <<<<<<<<<<<<<<
- *
+ *
* ctypedef long (* rk_disc0)(rk_state *state)
*/
typedef double (*__pyx_t_6mtrand_rk_cont3)(rk_state *, double, double, double);
/* "mtrand.pyx":112
* ctypedef double (* rk_cont3)(rk_state *state, double a, double b, double c)
- *
+ *
* ctypedef long (* rk_disc0)(rk_state *state) # <<<<<<<<<<<<<<
* ctypedef long (* rk_discnp)(rk_state *state, long n, double p)
* ctypedef long (* rk_discdd)(rk_state *state, double n, double p)
@@ -530,7 +530,7 @@ typedef double (*__pyx_t_6mtrand_rk_cont3)(rk_state *, double, double, double);
typedef long (*__pyx_t_6mtrand_rk_disc0)(rk_state *);
/* "mtrand.pyx":113
- *
+ *
* ctypedef long (* rk_disc0)(rk_state *state)
* ctypedef long (* rk_discnp)(rk_state *state, long n, double p) # <<<<<<<<<<<<<<
* ctypedef long (* rk_discdd)(rk_state *state, double n, double p)
@@ -552,7 +552,7 @@ typedef long (*__pyx_t_6mtrand_rk_discdd)(rk_state *, double, double);
* ctypedef long (* rk_discdd)(rk_state *state, double n, double p)
* ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N) # <<<<<<<<<<<<<<
* ctypedef long (* rk_discd)(rk_state *state, double a)
- *
+ *
*/
typedef long (*__pyx_t_6mtrand_rk_discnmN)(rk_state *, long, long, long);
@@ -560,14 +560,14 @@ typedef long (*__pyx_t_6mtrand_rk_discnmN)(rk_state *, long, long, long);
* ctypedef long (* rk_discdd)(rk_state *state, double n, double p)
* ctypedef long (* rk_discnmN)(rk_state *state, long n, long m, long N)
* ctypedef long (* rk_discd)(rk_state *state, double a) # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
typedef long (*__pyx_t_6mtrand_rk_discd)(rk_state *, double);
/* "mtrand.pyx":525
* return sum
- *
+ *
* cdef class RandomState: # <<<<<<<<<<<<<<
* """
* RandomState(seed=None)
@@ -1629,7 +1629,7 @@ static PyObject *__pyx_k_tuple_198;
/* "mtrand.pyx":129
* import operator
- *
+ *
* cdef object cont0_array(rk_state *state, rk_cont0 func, object size): # <<<<<<<<<<<<<<
* cdef double *array_data
* cdef ndarray array "arrayObject"
@@ -1654,7 +1654,7 @@ static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":135
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state)
* else:
@@ -1663,7 +1663,7 @@ static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *__pyx_v_state, __pyx_t_6m
if (__pyx_t_1) {
/* "mtrand.pyx":136
- *
+ *
* if size is None:
* return func(state) # <<<<<<<<<<<<<<
* else:
@@ -1747,7 +1747,7 @@ static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *__pyx_v_state, __pyx_t_6m
* for i from 0 <= i < length:
* array_data[i] = func(state) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state);
}
@@ -1756,8 +1756,8 @@ static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *__pyx_v_state, __pyx_t_6m
* for i from 0 <= i < length:
* array_data[i] = func(state)
* return array # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)arrayObject));
@@ -1782,8 +1782,8 @@ static PyObject *__pyx_f_6mtrand_cont0_array(rk_state *__pyx_v_state, __pyx_t_6m
}
/* "mtrand.pyx":146
- *
- *
+ *
+ *
* cdef object cont1_array_sc(rk_state *state, rk_cont1 func, object size, double a): # <<<<<<<<<<<<<<
* cdef double *array_data
* cdef ndarray array "arrayObject"
@@ -1808,7 +1808,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":152
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, a)
* else:
@@ -1817,7 +1817,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *__pyx_v_state, __pyx_t
if (__pyx_t_1) {
/* "mtrand.pyx":153
- *
+ *
* if size is None:
* return func(state, a) # <<<<<<<<<<<<<<
* else:
@@ -1901,7 +1901,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_a);
}
@@ -1910,7 +1910,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object cont1_array(rk_state *state, rk_cont1 func, object size, ndarray oa):
*/
__Pyx_XDECREF(__pyx_r);
@@ -1937,7 +1937,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":162
* return array
- *
+ *
* cdef object cont1_array(rk_state *state, rk_cont1 func, object size, ndarray oa): # <<<<<<<<<<<<<<
* cdef double *array_data
* cdef double *oa_data
@@ -1965,7 +1965,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":171
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* array = <ndarray>PyArray_SimpleNew(PyArray_NDIM(oa),
* PyArray_DIMS(oa) , NPY_DOUBLE)
@@ -2171,7 +2171,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0])
* PyArray_MultiIter_NEXTi(multi, 1) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 1);
}
@@ -2182,7 +2182,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0])
* PyArray_MultiIter_NEXTi(multi, 1)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object cont2_array_sc(rk_state *state, rk_cont2 func, object size, double a,
*/
__Pyx_XDECREF(__pyx_r);
@@ -2209,7 +2209,7 @@ static PyObject *__pyx_f_6mtrand_cont1_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":193
* return array
- *
+ *
* cdef object cont2_array_sc(rk_state *state, rk_cont2 func, object size, double a, # <<<<<<<<<<<<<<
* double b):
* cdef double *array_data
@@ -2234,7 +2234,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":200
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, a, b)
* else:
@@ -2243,7 +2243,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *__pyx_v_state, __pyx_t
if (__pyx_t_1) {
/* "mtrand.pyx":201
- *
+ *
* if size is None:
* return func(state, a, b) # <<<<<<<<<<<<<<
* else:
@@ -2327,7 +2327,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a, b) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_a, __pyx_v_b);
}
@@ -2336,8 +2336,8 @@ static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a, b)
* return array # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject *)arrayObject));
@@ -2362,8 +2362,8 @@ static PyObject *__pyx_f_6mtrand_cont2_array_sc(rk_state *__pyx_v_state, __pyx_t
}
/* "mtrand.pyx":211
- *
- *
+ *
+ *
* cdef object cont2_array(rk_state *state, rk_cont2 func, object size, # <<<<<<<<<<<<<<
* ndarray oa, ndarray ob):
* cdef double *array_data
@@ -2390,7 +2390,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":221
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>oa, <void *>ob)
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
@@ -2399,7 +2399,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *__pyx_v_state, __pyx_t_6m
if (__pyx_t_1) {
/* "mtrand.pyx":222
- *
+ *
* if size is None:
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>oa, <void *>ob) # <<<<<<<<<<<<<<
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
@@ -2623,7 +2623,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *__pyx_v_state, __pyx_t_6m
* PyArray_MultiIter_NEXTi(multi, 1)
* PyArray_MultiIter_NEXTi(multi, 2) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 2);
}
@@ -2634,7 +2634,7 @@ static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *__pyx_v_state, __pyx_t_6m
* PyArray_MultiIter_NEXTi(multi, 1)
* PyArray_MultiIter_NEXTi(multi, 2)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object cont3_array_sc(rk_state *state, rk_cont3 func, object size, double a,
*/
__Pyx_XDECREF(__pyx_r);
@@ -2660,10 +2660,10 @@ static PyObject *__pyx_f_6mtrand_cont2_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":244
* return array
- *
+ *
* cdef object cont3_array_sc(rk_state *state, rk_cont3 func, object size, double a, # <<<<<<<<<<<<<<
* double b, double c):
- *
+ *
*/
static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t_6mtrand_rk_cont3 __pyx_v_func, PyObject *__pyx_v_size, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c) {
@@ -2685,7 +2685,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":252
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, a, b, c)
* else:
@@ -2694,7 +2694,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t
if (__pyx_t_1) {
/* "mtrand.pyx":253
- *
+ *
* if size is None:
* return func(state, a, b, c) # <<<<<<<<<<<<<<
* else:
@@ -2778,7 +2778,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a, b, c) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_a, __pyx_v_b, __pyx_v_c);
}
@@ -2787,7 +2787,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a, b, c)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object cont3_array(rk_state *state, rk_cont3 func, object size, ndarray oa,
*/
__Pyx_XDECREF(__pyx_r);
@@ -2814,10 +2814,10 @@ static PyObject *__pyx_f_6mtrand_cont3_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":262
* return array
- *
+ *
* cdef object cont3_array(rk_state *state, rk_cont3 func, object size, ndarray oa, # <<<<<<<<<<<<<<
* ndarray ob, ndarray oc):
- *
+ *
*/
static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6mtrand_rk_cont3 __pyx_v_func, PyObject *__pyx_v_size, PyArrayObject *__pyx_v_oa, PyArrayObject *__pyx_v_ob, PyArrayObject *__pyx_v_oc) {
@@ -2842,7 +2842,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":274
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* multi = <broadcast> PyArray_MultiIterNew(3, <void *>oa, <void *>ob, <void *>oc)
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
@@ -2851,7 +2851,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6m
if (__pyx_t_1) {
/* "mtrand.pyx":275
- *
+ *
* if size is None:
* multi = <broadcast> PyArray_MultiIterNew(3, <void *>oa, <void *>ob, <void *>oc) # <<<<<<<<<<<<<<
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_DOUBLE)
@@ -3084,7 +3084,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0])
* PyArray_MultiIter_NEXT(multi) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
PyArray_MultiIter_NEXT(__pyx_v_multi);
}
@@ -3095,7 +3095,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0], ob_data[0], oc_data[0])
* PyArray_MultiIter_NEXT(multi)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object disc0_array(rk_state *state, rk_disc0 func, object size):
*/
__Pyx_XDECREF(__pyx_r);
@@ -3121,7 +3121,7 @@ static PyObject *__pyx_f_6mtrand_cont3_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":299
* return array
- *
+ *
* cdef object disc0_array(rk_state *state, rk_disc0 func, object size): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -3146,7 +3146,7 @@ static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":305
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state)
* else:
@@ -3155,7 +3155,7 @@ static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *__pyx_v_state, __pyx_t_6m
if (__pyx_t_1) {
/* "mtrand.pyx":306
- *
+ *
* if size is None:
* return func(state) # <<<<<<<<<<<<<<
* else:
@@ -3234,7 +3234,7 @@ static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *__pyx_v_state, __pyx_t_6m
* for i from 0 <= i < length:
* array_data[i] = func(state) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state);
}
@@ -3243,7 +3243,7 @@ static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *__pyx_v_state, __pyx_t_6m
* for i from 0 <= i < length:
* array_data[i] = func(state)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discnp_array_sc(rk_state *state, rk_discnp func, object size, long n, double p):
*/
__Pyx_XDECREF(__pyx_r);
@@ -3270,7 +3270,7 @@ static PyObject *__pyx_f_6mtrand_disc0_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":315
* return array
- *
+ *
* cdef object discnp_array_sc(rk_state *state, rk_discnp func, object size, long n, double p): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -3295,7 +3295,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *__pyx_v_state, __pyx_
/* "mtrand.pyx":321
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, n, p)
* else:
@@ -3304,7 +3304,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *__pyx_v_state, __pyx_
if (__pyx_t_1) {
/* "mtrand.pyx":322
- *
+ *
* if size is None:
* return func(state, n, p) # <<<<<<<<<<<<<<
* else:
@@ -3383,7 +3383,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *__pyx_v_state, __pyx_
* for i from 0 <= i < length:
* array_data[i] = func(state, n, p) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_n, __pyx_v_p);
}
@@ -3392,7 +3392,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *__pyx_v_state, __pyx_
* for i from 0 <= i < length:
* array_data[i] = func(state, n, p)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discnp_array(rk_state *state, rk_discnp func, object size, ndarray on, ndarray op):
*/
__Pyx_XDECREF(__pyx_r);
@@ -3419,7 +3419,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array_sc(rk_state *__pyx_v_state, __pyx_
/* "mtrand.pyx":331
* return array
- *
+ *
* cdef object discnp_array(rk_state *state, rk_discnp func, object size, ndarray on, ndarray op): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -3446,7 +3446,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":340
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op)
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -3455,7 +3455,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
if (__pyx_t_1) {
/* "mtrand.pyx":341
- *
+ *
* if size is None:
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op) # <<<<<<<<<<<<<<
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -3665,7 +3665,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
* array_data[i] = func(state, on_data[0], op_data[0])
* PyArray_MultiIter_NEXTi(multi, 1) # <<<<<<<<<<<<<<
* PyArray_MultiIter_NEXTi(multi, 2)
- *
+ *
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 1);
@@ -3673,7 +3673,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
* array_data[i] = func(state, on_data[0], op_data[0])
* PyArray_MultiIter_NEXTi(multi, 1)
* PyArray_MultiIter_NEXTi(multi, 2) # <<<<<<<<<<<<<<
- *
+ *
* return array
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 2);
@@ -3683,9 +3683,9 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":362
* PyArray_MultiIter_NEXTi(multi, 2)
- *
+ *
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discdd_array_sc(rk_state *state, rk_discdd func, object size, double n, double p):
*/
__Pyx_XDECREF(__pyx_r);
@@ -3711,7 +3711,7 @@ static PyObject *__pyx_f_6mtrand_discnp_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":364
* return array
- *
+ *
* cdef object discdd_array_sc(rk_state *state, rk_discdd func, object size, double n, double p): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -3736,7 +3736,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *__pyx_v_state, __pyx_
/* "mtrand.pyx":370
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, n, p)
* else:
@@ -3745,7 +3745,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *__pyx_v_state, __pyx_
if (__pyx_t_1) {
/* "mtrand.pyx":371
- *
+ *
* if size is None:
* return func(state, n, p) # <<<<<<<<<<<<<<
* else:
@@ -3824,7 +3824,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *__pyx_v_state, __pyx_
* for i from 0 <= i < length:
* array_data[i] = func(state, n, p) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_n, __pyx_v_p);
}
@@ -3833,7 +3833,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *__pyx_v_state, __pyx_
* for i from 0 <= i < length:
* array_data[i] = func(state, n, p)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discdd_array(rk_state *state, rk_discdd func, object size, ndarray on, ndarray op):
*/
__Pyx_XDECREF(__pyx_r);
@@ -3860,7 +3860,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array_sc(rk_state *__pyx_v_state, __pyx_
/* "mtrand.pyx":380
* return array
- *
+ *
* cdef object discdd_array(rk_state *state, rk_discdd func, object size, ndarray on, ndarray op): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -3887,7 +3887,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":389
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op)
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -3896,7 +3896,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
if (__pyx_t_1) {
/* "mtrand.pyx":390
- *
+ *
* if size is None:
* multi = <broadcast> PyArray_MultiIterNew(2, <void *>on, <void *>op) # <<<<<<<<<<<<<<
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -4106,7 +4106,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
* array_data[i] = func(state, on_data[0], op_data[0])
* PyArray_MultiIter_NEXTi(multi, 1) # <<<<<<<<<<<<<<
* PyArray_MultiIter_NEXTi(multi, 2)
- *
+ *
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 1);
@@ -4114,7 +4114,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
* array_data[i] = func(state, on_data[0], op_data[0])
* PyArray_MultiIter_NEXTi(multi, 1)
* PyArray_MultiIter_NEXTi(multi, 2) # <<<<<<<<<<<<<<
- *
+ *
* return array
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 2);
@@ -4124,9 +4124,9 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":411
* PyArray_MultiIter_NEXTi(multi, 2)
- *
+ *
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discnmN_array_sc(rk_state *state, rk_discnmN func, object size,
*/
__Pyx_XDECREF(__pyx_r);
@@ -4152,7 +4152,7 @@ static PyObject *__pyx_f_6mtrand_discdd_array(rk_state *__pyx_v_state, __pyx_t_6
/* "mtrand.pyx":413
* return array
- *
+ *
* cdef object discnmN_array_sc(rk_state *state, rk_discnmN func, object size, # <<<<<<<<<<<<<<
* long n, long m, long N):
* cdef long *array_data
@@ -4177,7 +4177,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *__pyx_v_state, __pyx
/* "mtrand.pyx":420
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, n, m, N)
* else:
@@ -4186,7 +4186,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *__pyx_v_state, __pyx
if (__pyx_t_1) {
/* "mtrand.pyx":421
- *
+ *
* if size is None:
* return func(state, n, m, N) # <<<<<<<<<<<<<<
* else:
@@ -4265,7 +4265,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *__pyx_v_state, __pyx
* for i from 0 <= i < length:
* array_data[i] = func(state, n, m, N) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_n, __pyx_v_m, __pyx_v_N);
}
@@ -4274,7 +4274,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *__pyx_v_state, __pyx
* for i from 0 <= i < length:
* array_data[i] = func(state, n, m, N)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discnmN_array(rk_state *state, rk_discnmN func, object size,
*/
__Pyx_XDECREF(__pyx_r);
@@ -4301,7 +4301,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array_sc(rk_state *__pyx_v_state, __pyx
/* "mtrand.pyx":430
* return array
- *
+ *
* cdef object discnmN_array(rk_state *state, rk_discnmN func, object size, # <<<<<<<<<<<<<<
* ndarray on, ndarray om, ndarray oN):
* cdef long *array_data
@@ -4329,7 +4329,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
/* "mtrand.pyx":441
* cdef broadcast multi
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* multi = <broadcast> PyArray_MultiIterNew(3, <void *>on, <void *>om, <void *>oN)
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -4338,7 +4338,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
if (__pyx_t_1) {
/* "mtrand.pyx":442
- *
+ *
* if size is None:
* multi = <broadcast> PyArray_MultiIterNew(3, <void *>on, <void *>om, <void *>oN) # <<<<<<<<<<<<<<
* array = <ndarray> PyArray_SimpleNew(multi.nd, multi.dimensions, NPY_LONG)
@@ -4557,7 +4557,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
* oN_data = <long *>PyArray_MultiIter_DATA(multi, 3)
* array_data[i] = func(state, on_data[0], om_data[0], oN_data[0]) # <<<<<<<<<<<<<<
* PyArray_MultiIter_NEXT(multi)
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, (__pyx_v_on_data[0]), (__pyx_v_om_data[0]), (__pyx_v_oN_data[0]));
@@ -4565,7 +4565,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
* oN_data = <long *>PyArray_MultiIter_DATA(multi, 3)
* array_data[i] = func(state, on_data[0], om_data[0], oN_data[0])
* PyArray_MultiIter_NEXT(multi) # <<<<<<<<<<<<<<
- *
+ *
* return array
*/
PyArray_MultiIter_NEXT(__pyx_v_multi);
@@ -4575,9 +4575,9 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
/* "mtrand.pyx":465
* PyArray_MultiIter_NEXT(multi)
- *
+ *
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discd_array_sc(rk_state *state, rk_discd func, object size, double a):
*/
__Pyx_XDECREF(__pyx_r);
@@ -4603,7 +4603,7 @@ static PyObject *__pyx_f_6mtrand_discnmN_array(rk_state *__pyx_v_state, __pyx_t_
/* "mtrand.pyx":467
* return array
- *
+ *
* cdef object discd_array_sc(rk_state *state, rk_discd func, object size, double a): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef ndarray array "arrayObject"
@@ -4628,7 +4628,7 @@ static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":473
* cdef npy_intp i
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* return func(state, a)
* else:
@@ -4637,7 +4637,7 @@ static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *__pyx_v_state, __pyx_t
if (__pyx_t_1) {
/* "mtrand.pyx":474
- *
+ *
* if size is None:
* return func(state, a) # <<<<<<<<<<<<<<
* else:
@@ -4716,7 +4716,7 @@ static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_func(__pyx_v_state, __pyx_v_a);
}
@@ -4725,7 +4725,7 @@ static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *__pyx_v_state, __pyx_t
* for i from 0 <= i < length:
* array_data[i] = func(state, a)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef object discd_array(rk_state *state, rk_discd func, object size, ndarray oa):
*/
__Pyx_XDECREF(__pyx_r);
@@ -4752,7 +4752,7 @@ static PyObject *__pyx_f_6mtrand_discd_array_sc(rk_state *__pyx_v_state, __pyx_t
/* "mtrand.pyx":483
* return array
- *
+ *
* cdef object discd_array(rk_state *state, rk_discd func, object size, ndarray oa): # <<<<<<<<<<<<<<
* cdef long *array_data
* cdef double *oa_data
@@ -4780,7 +4780,7 @@ static PyObject *__pyx_f_6mtrand_discd_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":492
* cdef flatiter itera
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* array = <ndarray>PyArray_SimpleNew(PyArray_NDIM(oa),
* PyArray_DIMS(oa), NPY_LONG)
@@ -4981,7 +4981,7 @@ static PyObject *__pyx_f_6mtrand_discd_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0])
* PyArray_MultiIter_NEXTi(multi, 1) # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
PyArray_MultiIter_NEXTi(__pyx_v_multi, 1);
}
@@ -4992,7 +4992,7 @@ static PyObject *__pyx_f_6mtrand_discd_array(rk_state *__pyx_v_state, __pyx_t_6m
* array_data[i] = func(state, oa_data[0])
* PyArray_MultiIter_NEXTi(multi, 1)
* return array # <<<<<<<<<<<<<<
- *
+ *
* cdef double kahan_sum(double *darr, npy_intp n):
*/
__Pyx_XDECREF(__pyx_r);
@@ -5019,7 +5019,7 @@ static PyObject *__pyx_f_6mtrand_discd_array(rk_state *__pyx_v_state, __pyx_t_6m
/* "mtrand.pyx":513
* return array
- *
+ *
* cdef double kahan_sum(double *darr, npy_intp n): # <<<<<<<<<<<<<<
* cdef double c, y, t, sum
* cdef npy_intp i
@@ -5096,7 +5096,7 @@ static double __pyx_f_6mtrand_kahan_sum(double *__pyx_v_darr, npy_intp __pyx_v_n
* c = (t-sum) - y
* sum = t # <<<<<<<<<<<<<<
* return sum
- *
+ *
*/
__pyx_v_sum = __pyx_v_t;
}
@@ -5105,7 +5105,7 @@ static double __pyx_f_6mtrand_kahan_sum(double *__pyx_v_darr, npy_intp __pyx_v_n
* c = (t-sum) - y
* sum = t
* return sum # <<<<<<<<<<<<<<
- *
+ *
* cdef class RandomState:
*/
__pyx_r = __pyx_v_sum;
@@ -5133,10 +5133,10 @@ static int __pyx_pw_6mtrand_11RandomState_1__init__(PyObject *__pyx_v_self, PyOb
/* "mtrand.pyx":561
* poisson_lam_max = np.iinfo('l').max - np.sqrt(np.iinfo('l').max)*10
- *
+ *
* def __init__(self, seed=None): # <<<<<<<<<<<<<<
* self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state))
- *
+ *
*/
values[0] = ((PyObject *)Py_None);
if (unlikely(__pyx_kwds)) {
@@ -5192,19 +5192,19 @@ static int __pyx_pf_6mtrand_11RandomState___init__(struct __pyx_obj_6mtrand_Rand
__Pyx_RefNannySetupContext("__init__", 0);
/* "mtrand.pyx":562
- *
+ *
* def __init__(self, seed=None):
* self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state)) # <<<<<<<<<<<<<<
- *
+ *
* self.seed(seed)
*/
__pyx_v_self->internal_state = ((rk_state *)PyMem_Malloc((sizeof(rk_state))));
/* "mtrand.pyx":564
* self.internal_state = <rk_state*>PyMem_Malloc(sizeof(rk_state))
- *
+ *
* self.seed(seed) # <<<<<<<<<<<<<<
- *
+ *
* def __dealloc__(self):
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__seed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5244,7 +5244,7 @@ static void __pyx_pw_6mtrand_11RandomState_3__dealloc__(PyObject *__pyx_v_self)
/* "mtrand.pyx":566
* self.seed(seed)
- *
+ *
* def __dealloc__(self): # <<<<<<<<<<<<<<
* if self.internal_state != NULL:
* PyMem_Free(self.internal_state)
@@ -5256,7 +5256,7 @@ static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand
__Pyx_RefNannySetupContext("__dealloc__", 0);
/* "mtrand.pyx":567
- *
+ *
* def __dealloc__(self):
* if self.internal_state != NULL: # <<<<<<<<<<<<<<
* PyMem_Free(self.internal_state)
@@ -5270,7 +5270,7 @@ static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand
* if self.internal_state != NULL:
* PyMem_Free(self.internal_state) # <<<<<<<<<<<<<<
* self.internal_state = NULL
- *
+ *
*/
PyMem_Free(__pyx_v_self->internal_state);
@@ -5278,7 +5278,7 @@ static void __pyx_pf_6mtrand_11RandomState_2__dealloc__(struct __pyx_obj_6mtrand
* if self.internal_state != NULL:
* PyMem_Free(self.internal_state)
* self.internal_state = NULL # <<<<<<<<<<<<<<
- *
+ *
* def seed(self, seed=None):
*/
__pyx_v_self->internal_state = NULL;
@@ -5306,7 +5306,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_5seed(PyObject *__pyx_v_self, Py
/* "mtrand.pyx":571
* self.internal_state = NULL
- *
+ *
* def seed(self, seed=None): # <<<<<<<<<<<<<<
* """
* seed(seed=None)
@@ -5477,7 +5477,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_4seed(struct __pyx_obj_6mtrand_R
* obj = <ndarray>PyArray_ContiguousFromObject(seed, NPY_LONG, 1, 1)
* init_by_array(self.internal_state, <unsigned long *>PyArray_DATA(obj),
* PyArray_DIM(obj, 0)) # <<<<<<<<<<<<<<
- *
+ *
* def get_state(self):
*/
init_by_array(__pyx_v_self->internal_state, ((unsigned long *)PyArray_DATA(arrayObject_obj)), PyArray_DIM(arrayObject_obj, 0));
@@ -5513,7 +5513,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_7get_state(PyObject *__pyx_v_sel
/* "mtrand.pyx":604
* PyArray_DIM(obj, 0))
- *
+ *
* def get_state(self): # <<<<<<<<<<<<<<
* """
* get_state()
@@ -5617,7 +5617,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_6get_state(struct __pyx_obj_6mtr
* state = <ndarray>np.asarray(state, np.uint32)
* return ('MT19937', state, self.internal_state.pos, # <<<<<<<<<<<<<<
* self.internal_state.has_gauss, self.internal_state.gauss)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyInt_FromLong(__pyx_v_self->internal_state->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5627,7 +5627,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_6get_state(struct __pyx_obj_6mtr
* state = <ndarray>np.asarray(state, np.uint32)
* return ('MT19937', state, self.internal_state.pos,
* self.internal_state.has_gauss, self.internal_state.gauss) # <<<<<<<<<<<<<<
- *
+ *
* def set_state(self, state):
*/
__pyx_t_2 = PyInt_FromLong(__pyx_v_self->internal_state->has_gauss); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5685,7 +5685,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_9set_state(PyObject *__pyx_v_sel
/* "mtrand.pyx":641
* self.internal_state.has_gauss, self.internal_state.gauss)
- *
+ *
* def set_state(self, state): # <<<<<<<<<<<<<<
* """
* set_state(state)
@@ -5781,11 +5781,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtr
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
} else {
- __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_4);
@@ -5883,11 +5883,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtr
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
} else {
- __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_3);
@@ -6064,7 +6064,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtr
* self.internal_state.pos = pos
* self.internal_state.has_gauss = has_gauss # <<<<<<<<<<<<<<
* self.internal_state.gauss = cached_gaussian
- *
+ *
*/
__pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_has_gauss); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_self->internal_state->has_gauss = __pyx_t_7;
@@ -6073,7 +6073,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_8set_state(struct __pyx_obj_6mtr
* self.internal_state.pos = pos
* self.internal_state.has_gauss = has_gauss
* self.internal_state.gauss = cached_gaussian # <<<<<<<<<<<<<<
- *
+ *
* # Pickling support:
*/
__pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_cached_gaussian); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6112,11 +6112,11 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_11__getstate__(PyObject *__pyx_v
}
/* "mtrand.pyx":712
- *
+ *
* # Pickling support:
* def __getstate__(self): # <<<<<<<<<<<<<<
* return self.get_state()
- *
+ *
*/
static PyObject *__pyx_pf_6mtrand_11RandomState_10__getstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
@@ -6133,7 +6133,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_10__getstate__(struct __pyx_obj_
* # Pickling support:
* def __getstate__(self):
* return self.get_state() # <<<<<<<<<<<<<<
- *
+ *
* def __setstate__(self, state):
*/
__Pyx_XDECREF(__pyx_r);
@@ -6172,10 +6172,10 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_13__setstate__(PyObject *__pyx_v
/* "mtrand.pyx":715
* return self.get_state()
- *
+ *
* def __setstate__(self, state): # <<<<<<<<<<<<<<
* self.set_state(state)
- *
+ *
*/
static PyObject *__pyx_pf_6mtrand_11RandomState_12__setstate__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self, PyObject *__pyx_v_state) {
@@ -6190,10 +6190,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_12__setstate__(struct __pyx_obj_
__Pyx_RefNannySetupContext("__setstate__", 0);
/* "mtrand.pyx":716
- *
+ *
* def __setstate__(self, state):
* self.set_state(state) # <<<<<<<<<<<<<<
- *
+ *
* def __reduce__(self):
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__set_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6236,10 +6236,10 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_15__reduce__(PyObject *__pyx_v_s
/* "mtrand.pyx":718
* self.set_state(state)
- *
+ *
* def __reduce__(self): # <<<<<<<<<<<<<<
* return (np.random.__RandomState_ctor, (), self.get_state())
- *
+ *
*/
static PyObject *__pyx_pf_6mtrand_11RandomState_14__reduce__(struct __pyx_obj_6mtrand_RandomState *__pyx_v_self) {
@@ -6254,10 +6254,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_14__reduce__(struct __pyx_obj_6m
__Pyx_RefNannySetupContext("__reduce__", 0);
/* "mtrand.pyx":719
- *
+ *
* def __reduce__(self):
* return (np.random.__RandomState_ctor, (), self.get_state()) # <<<<<<<<<<<<<<
- *
+ *
* # Basic distributions:
*/
__Pyx_XDECREF(__pyx_r);
@@ -6319,7 +6319,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_17random_sample(PyObject *__pyx_
PyObject* values[1] = {0};
/* "mtrand.pyx":722
- *
+ *
* # Basic distributions:
* def random_sample(self, size=None): # <<<<<<<<<<<<<<
* """
@@ -6377,10 +6377,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_16random_sample(struct __pyx_obj
__Pyx_RefNannySetupContext("random_sample", 0);
/* "mtrand.pyx":763
- *
+ *
* """
* return cont0_array(self.internal_state, rk_double, size) # <<<<<<<<<<<<<<
- *
+ *
* def tomaxint(self, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -6419,7 +6419,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_19tomaxint(PyObject *__pyx_v_sel
/* "mtrand.pyx":765
* return cont0_array(self.internal_state, rk_double, size)
- *
+ *
* def tomaxint(self, size=None): # <<<<<<<<<<<<<<
* """
* tomaxint(size=None)
@@ -6476,10 +6476,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_18tomaxint(struct __pyx_obj_6mtr
__Pyx_RefNannySetupContext("tomaxint", 0);
/* "mtrand.pyx":810
- *
+ *
* """
* return disc0_array(self.internal_state, rk_long, size) # <<<<<<<<<<<<<<
- *
+ *
* def randint(self, low, high=None, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -6520,7 +6520,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_21randint(PyObject *__pyx_v_self
/* "mtrand.pyx":812
* return disc0_array(self.internal_state, rk_long, size)
- *
+ *
* def randint(self, low, high=None, size=None): # <<<<<<<<<<<<<<
* """
* randint(low, high=None, size=None)
@@ -6606,7 +6606,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
/* "mtrand.pyx":869
* cdef npy_intp i
- *
+ *
* if high is None: # <<<<<<<<<<<<<<
* lo = 0
* hi = low
@@ -6615,7 +6615,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
if (__pyx_t_1) {
/* "mtrand.pyx":870
- *
+ *
* if high is None:
* lo = 0 # <<<<<<<<<<<<<<
* hi = low
@@ -6641,7 +6641,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
* else:
* lo = low # <<<<<<<<<<<<<<
* hi = high
- *
+ *
*/
__pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_v_low); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_lo = __pyx_t_2;
@@ -6650,7 +6650,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
* else:
* lo = low
* hi = high # <<<<<<<<<<<<<<
- *
+ *
* if lo >= hi :
*/
__pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_v_high); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6660,19 +6660,19 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
/* "mtrand.pyx":876
* hi = high
- *
+ *
* if lo >= hi : # <<<<<<<<<<<<<<
* raise ValueError("low >= high")
- *
+ *
*/
__pyx_t_1 = (__pyx_v_lo >= __pyx_v_hi);
if (__pyx_t_1) {
/* "mtrand.pyx":877
- *
+ *
* if lo >= hi :
* raise ValueError("low >= high") # <<<<<<<<<<<<<<
- *
+ *
* diff = <unsigned long>hi - <unsigned long>lo - 1UL
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -6686,7 +6686,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
/* "mtrand.pyx":879
* raise ValueError("low >= high")
- *
+ *
* diff = <unsigned long>hi - <unsigned long>lo - 1UL # <<<<<<<<<<<<<<
* if size is None:
* rv = lo + <long>rk_interval(diff, self. internal_state)
@@ -6694,7 +6694,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
__pyx_v_diff = ((((unsigned long)__pyx_v_hi) - ((unsigned long)__pyx_v_lo)) - 1UL);
/* "mtrand.pyx":880
- *
+ *
* diff = <unsigned long>hi - <unsigned long>lo - 1UL
* if size is None: # <<<<<<<<<<<<<<
* rv = lo + <long>rk_interval(diff, self. internal_state)
@@ -6801,7 +6801,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
* rv = lo + <long>rk_interval(diff, self. internal_state)
* array_data[i] = rv # <<<<<<<<<<<<<<
* return array
- *
+ *
*/
(__pyx_v_array_data[__pyx_v_i]) = __pyx_v_rv;
}
@@ -6810,7 +6810,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_20randint(struct __pyx_obj_6mtra
* rv = lo + <long>rk_interval(diff, self. internal_state)
* array_data[i] = rv
* return array # <<<<<<<<<<<<<<
- *
+ *
* def bytes(self, npy_intp length):
*/
__Pyx_XDECREF(__pyx_r);
@@ -6862,7 +6862,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_23bytes(PyObject *__pyx_v_self,
/* "mtrand.pyx":892
* return array
- *
+ *
* def bytes(self, npy_intp length): # <<<<<<<<<<<<<<
* """
* bytes(length)
@@ -6896,7 +6896,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_22bytes(struct __pyx_obj_6mtrand
* bytestring = empty_py_bytes(length, &bytes)
* rk_fill(bytes, length, self.internal_state) # <<<<<<<<<<<<<<
* return bytestring
- *
+ *
*/
rk_fill(__pyx_v_bytes, __pyx_v_length, __pyx_v_self->internal_state);
@@ -6904,8 +6904,8 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_22bytes(struct __pyx_obj_6mtrand
* bytestring = empty_py_bytes(length, &bytes)
* rk_fill(bytes, length, self.internal_state)
* return bytestring # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_bytestring);
@@ -6944,8 +6944,8 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_25choice(PyObject *__pyx_v_self,
PyObject* values[4] = {0,0,0,0};
/* "mtrand.pyx":920
- *
- *
+ *
+ *
* def choice(self, a, size=None, replace=True, p=None): # <<<<<<<<<<<<<<
* """
* choice(a, size=None, replace=True, p=None)
@@ -7054,7 +7054,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
__Pyx_INCREF(__pyx_v_p);
/* "mtrand.pyx":998
- *
+ *
* # Format and Verify input
* a = np.array(a, copy=False) # <<<<<<<<<<<<<<
* if a.ndim == 0:
@@ -7280,7 +7280,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* pop_size = a.shape[0]
* if pop_size is 0: # <<<<<<<<<<<<<<
* raise ValueError("a must be non-empty")
- *
+ *
*/
__pyx_t_5 = (__pyx_v_pop_size == __pyx_int_0);
if (__pyx_t_5) {
@@ -7289,7 +7289,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* pop_size = a.shape[0]
* if pop_size is 0:
* raise ValueError("a must be non-empty") # <<<<<<<<<<<<<<
- *
+ *
* if None != p:
*/
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -7305,7 +7305,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1014
* raise ValueError("a must be non-empty")
- *
+ *
* if None != p: # <<<<<<<<<<<<<<
* p = np.array(p, dtype=np.double, ndmin=1, copy=False)
* if p.ndim != 1:
@@ -7316,7 +7316,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
if (__pyx_t_5) {
/* "mtrand.pyx":1015
- *
+ *
* if None != p:
* p = np.array(p, dtype=np.double, ndmin=1, copy=False) # <<<<<<<<<<<<<<
* if p.ndim != 1:
@@ -7464,7 +7464,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* raise ValueError("probabilities are not non-negative")
* if not np.allclose(p.sum(), 1): # <<<<<<<<<<<<<<
* raise ValueError("probabilities do not sum to 1")
- *
+ *
*/
__pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -7497,7 +7497,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* raise ValueError("probabilities are not non-negative")
* if not np.allclose(p.sum(), 1):
* raise ValueError("probabilities do not sum to 1") # <<<<<<<<<<<<<<
- *
+ *
* shape = size
*/
__pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -7514,7 +7514,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1025
* raise ValueError("probabilities do not sum to 1")
- *
+ *
* shape = size # <<<<<<<<<<<<<<
* if shape is not None:
* size = np.prod(shape, dtype=np.intp)
@@ -7523,7 +7523,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
__pyx_v_shape = __pyx_v_size;
/* "mtrand.pyx":1026
- *
+ *
* shape = size
* if shape is not None: # <<<<<<<<<<<<<<
* size = np.prod(shape, dtype=np.intp)
@@ -7574,7 +7574,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* size = np.prod(shape, dtype=np.intp)
* else:
* size = 1 # <<<<<<<<<<<<<<
- *
+ *
* # Actual sampling
*/
__Pyx_INCREF(__pyx_int_1);
@@ -7584,7 +7584,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
__pyx_L21:;
/* "mtrand.pyx":1032
- *
+ *
* # Actual sampling
* if replace: # <<<<<<<<<<<<<<
* if None != p:
@@ -7767,7 +7767,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* if size > pop_size:
* raise ValueError("Cannot take a larger sample than " # <<<<<<<<<<<<<<
* "population when 'replace=False'")
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -7780,7 +7780,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1046
* "population when 'replace=False'")
- *
+ *
* if None != p: # <<<<<<<<<<<<<<
* if np.sum(p > 0) < size:
* raise ValueError("Fewer non-zero entries in p than size")
@@ -7791,7 +7791,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
if (__pyx_t_11) {
/* "mtrand.pyx":1047
- *
+ *
* if None != p:
* if np.sum(p > 0) < size: # <<<<<<<<<<<<<<
* raise ValueError("Fewer non-zero entries in p than size")
@@ -8082,11 +8082,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
} else {
- __pyx_t_10 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_10 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_t_4);
@@ -8236,7 +8236,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* idx = self.permutation(pop_size)[:size]
* if shape is not None: # <<<<<<<<<<<<<<
* idx.shape = shape
- *
+ *
*/
__pyx_t_11 = (__pyx_v_shape != Py_None);
if (__pyx_t_11) {
@@ -8245,7 +8245,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* idx = self.permutation(pop_size)[:size]
* if shape is not None:
* idx.shape = shape # <<<<<<<<<<<<<<
- *
+ *
* if shape is None and isinstance(idx, np.ndarray):
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_idx, __pyx_n_s__shape, __pyx_v_shape) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -8259,7 +8259,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1071
* idx.shape = shape
- *
+ *
* if shape is None and isinstance(idx, np.ndarray): # <<<<<<<<<<<<<<
* # In most cases a scalar will have been made an array
* idx = idx.item(0)
@@ -8283,7 +8283,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* if shape is None and isinstance(idx, np.ndarray):
* # In most cases a scalar will have been made an array
* idx = idx.item(0) # <<<<<<<<<<<<<<
- *
+ *
* #Use samples as indices for a if a is array-like
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_idx, __pyx_n_s__item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -8299,11 +8299,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
__pyx_L33:;
/* "mtrand.pyx":1076
- *
+ *
* #Use samples as indices for a if a is array-like
* if a.ndim == 0: # <<<<<<<<<<<<<<
* return idx
- *
+ *
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s__ndim); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -8317,7 +8317,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* #Use samples as indices for a if a is array-like
* if a.ndim == 0:
* return idx # <<<<<<<<<<<<<<
- *
+ *
* if shape is not None and idx.ndim == 0:
*/
__Pyx_XDECREF(__pyx_r);
@@ -8330,7 +8330,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1079
* return idx
- *
+ *
* if shape is not None and idx.ndim == 0: # <<<<<<<<<<<<<<
* # If size == () then the user requested a 0-d array as opposed to
* # a scalar object when size is None. However a[idx] is always a
@@ -8379,7 +8379,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* res = np.empty((), dtype=a.dtype)
* res[()] = a[idx] # <<<<<<<<<<<<<<
* return res
- *
+ *
*/
__pyx_t_10 = PyObject_GetItem(__pyx_v_a, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
@@ -8390,7 +8390,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
* res = np.empty((), dtype=a.dtype)
* res[()] = a[idx]
* return res # <<<<<<<<<<<<<<
- *
+ *
* return a[idx]
*/
__Pyx_XDECREF(__pyx_r);
@@ -8403,10 +8403,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_24choice(struct __pyx_obj_6mtran
/* "mtrand.pyx":1089
* return res
- *
+ *
* return a[idx] # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_10 = PyObject_GetItem(__pyx_v_a, __pyx_v_idx); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -8467,8 +8467,8 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_27uniform(PyObject *__pyx_v_self
values[1] = __pyx_k_41;
/* "mtrand.pyx":1092
- *
- *
+ *
+ *
* def uniform(self, low=0.0, high=1.0, size=None): # <<<<<<<<<<<<<<
* """
* uniform(low=0.0, high=1.0, size=1)
@@ -8551,7 +8551,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_26uniform(struct __pyx_obj_6mtra
/* "mtrand.pyx":1166
* cdef object temp
- *
+ *
* flow = PyFloat_AsDouble(low) # <<<<<<<<<<<<<<
* fhigh = PyFloat_AsDouble(high)
* if not PyErr_Occurred():
@@ -8559,7 +8559,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_26uniform(struct __pyx_obj_6mtra
__pyx_v_flow = PyFloat_AsDouble(__pyx_v_low);
/* "mtrand.pyx":1167
- *
+ *
* flow = PyFloat_AsDouble(low)
* fhigh = PyFloat_AsDouble(high) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -8674,7 +8674,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_26uniform(struct __pyx_obj_6mtra
* # rules because EnsureArray steals a reference
* odiff = <ndarray>PyArray_EnsureArray(temp) # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_uniform, size, olow, odiff)
- *
+ *
*/
__pyx_t_4 = PyArray_EnsureArray(__pyx_v_temp); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
@@ -8688,7 +8688,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_26uniform(struct __pyx_obj_6mtra
* # rules because EnsureArray steals a reference
* odiff = <ndarray>PyArray_EnsureArray(temp)
* return cont2_array(self.internal_state, rk_uniform, size, olow, odiff) # <<<<<<<<<<<<<<
- *
+ *
* def rand(self, *args):
*/
__Pyx_XDECREF(__pyx_r);
@@ -8735,7 +8735,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_29rand(PyObject *__pyx_v_self, P
/* "mtrand.pyx":1179
* return cont2_array(self.internal_state, rk_uniform, size, olow, odiff)
- *
+ *
* def rand(self, *args): # <<<<<<<<<<<<<<
* """
* rand(d0, d1, ..., dn)
@@ -8755,7 +8755,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_28rand(struct __pyx_obj_6mtrand_
__Pyx_RefNannySetupContext("rand", 0);
/* "mtrand.pyx":1218
- *
+ *
* """
* if len(args) == 0: # <<<<<<<<<<<<<<
* return self.random_sample()
@@ -8789,7 +8789,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_28rand(struct __pyx_obj_6mtrand_
* return self.random_sample()
* else:
* return self.random_sample(size=args) # <<<<<<<<<<<<<<
- *
+ *
* def randn(self, *args):
*/
__Pyx_XDECREF(__pyx_r);
@@ -8841,7 +8841,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_31randn(PyObject *__pyx_v_self,
/* "mtrand.pyx":1223
* return self.random_sample(size=args)
- *
+ *
* def randn(self, *args): # <<<<<<<<<<<<<<
* """
* randn(d0, d1, ..., dn)
@@ -8861,7 +8861,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_30randn(struct __pyx_obj_6mtrand
__Pyx_RefNannySetupContext("randn", 0);
/* "mtrand.pyx":1275
- *
+ *
* """
* if len(args) == 0: # <<<<<<<<<<<<<<
* return self.standard_normal()
@@ -8895,7 +8895,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_30randn(struct __pyx_obj_6mtrand
* return self.standard_normal()
* else:
* return self.standard_normal(args) # <<<<<<<<<<<<<<
- *
+ *
* def random_integers(self, low, high=None, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -8949,7 +8949,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_33random_integers(PyObject *__py
/* "mtrand.pyx":1280
* return self.standard_normal(args)
- *
+ *
* def random_integers(self, low, high=None, size=None): # <<<<<<<<<<<<<<
* """
* random_integers(low, high=None, size=None)
@@ -9026,7 +9026,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_32random_integers(struct __pyx_o
__Pyx_INCREF(__pyx_v_high);
/* "mtrand.pyx":1352
- *
+ *
* """
* if high is None: # <<<<<<<<<<<<<<
* high = low
@@ -9051,7 +9051,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_32random_integers(struct __pyx_o
* high = low
* low = 1 # <<<<<<<<<<<<<<
* return self.randint(low, high+1, size)
- *
+ *
*/
__Pyx_INCREF(__pyx_int_1);
__Pyx_DECREF(__pyx_v_low);
@@ -9064,7 +9064,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_32random_integers(struct __pyx_o
* high = low
* low = 1
* return self.randint(low, high+1, size) # <<<<<<<<<<<<<<
- *
+ *
* # Complicated, continuous distributions:
*/
__Pyx_XDECREF(__pyx_r);
@@ -9123,7 +9123,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_35standard_normal(PyObject *__py
PyObject* values[1] = {0};
/* "mtrand.pyx":1358
- *
+ *
* # Complicated, continuous distributions:
* def standard_normal(self, size=None): # <<<<<<<<<<<<<<
* """
@@ -9181,10 +9181,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_34standard_normal(struct __pyx_o
__Pyx_RefNannySetupContext("standard_normal", 0);
/* "mtrand.pyx":1388
- *
+ *
* """
* return cont0_array(self.internal_state, rk_gauss, size) # <<<<<<<<<<<<<<
- *
+ *
* def normal(self, loc=0.0, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -9227,7 +9227,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_37normal(PyObject *__pyx_v_self,
/* "mtrand.pyx":1390
* return cont0_array(self.internal_state, rk_gauss, size)
- *
+ *
* def normal(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* normal(loc=0.0, scale=1.0, size=None)
@@ -9309,7 +9309,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
/* "mtrand.pyx":1475
* cdef double floc, fscale
- *
+ *
* floc = PyFloat_AsDouble(loc) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -9317,7 +9317,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
__pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc);
/* "mtrand.pyx":1476
- *
+ *
* floc = PyFloat_AsDouble(loc)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -9350,7 +9350,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -9365,7 +9365,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -9380,16 +9380,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
/* "mtrand.pyx":1482
* return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oloc = <ndarray>PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":1484
* PyErr_Clear()
- *
+ *
* oloc = <ndarray>PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oscale, 0)):
@@ -9403,7 +9403,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
__pyx_t_3 = 0;
/* "mtrand.pyx":1485
- *
+ *
* oloc = <ndarray>PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oscale, 0)):
@@ -9464,7 +9464,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oscale, 0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_normal, size, oloc, oscale)
- *
+ *
*/
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
@@ -9479,7 +9479,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_36normal(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oscale, 0)):
* raise ValueError("scale <= 0")
* return cont2_array(self.internal_state, rk_normal, size, oloc, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def beta(self, a, b, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -9525,7 +9525,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_39beta(PyObject *__pyx_v_self, P
/* "mtrand.pyx":1490
* return cont2_array(self.internal_state, rk_normal, size, oloc, oscale)
- *
+ *
* def beta(self, a, b, size=None): # <<<<<<<<<<<<<<
* """
* beta(a, b, size=None)
@@ -9605,7 +9605,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":1530
* cdef double fa, fb
- *
+ *
* fa = PyFloat_AsDouble(a) # <<<<<<<<<<<<<<
* fb = PyFloat_AsDouble(b)
* if not PyErr_Occurred():
@@ -9613,7 +9613,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
__pyx_v_fa = PyFloat_AsDouble(__pyx_v_a);
/* "mtrand.pyx":1531
- *
+ *
* fa = PyFloat_AsDouble(a)
* fb = PyFloat_AsDouble(b) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -9672,7 +9672,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
* if fb <= 0:
* raise ValueError("b <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -9687,7 +9687,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
* if fb <= 0:
* raise ValueError("b <= 0")
* return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -9702,16 +9702,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":1539
* return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":1541
* PyErr_Clear()
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* ob = <ndarray>PyArray_FROM_OTF(b, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oa, 0)):
@@ -9725,7 +9725,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
__pyx_t_3 = 0;
/* "mtrand.pyx":1542
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* ob = <ndarray>PyArray_FROM_OTF(b, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oa, 0)):
@@ -9844,7 +9844,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
* if np.any(np.less_equal(ob, 0)):
* raise ValueError("b <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_beta, size, oa, ob)
- *
+ *
*/
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_52), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
@@ -9859,7 +9859,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_38beta(struct __pyx_obj_6mtrand_
* if np.any(np.less_equal(ob, 0)):
* raise ValueError("b <= 0")
* return cont2_array(self.internal_state, rk_beta, size, oa, ob) # <<<<<<<<<<<<<<
- *
+ *
* def exponential(self, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -9905,7 +9905,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_41exponential(PyObject *__pyx_v_
/* "mtrand.pyx":1549
* return cont2_array(self.internal_state, rk_beta, size, oa, ob)
- *
+ *
* def exponential(self, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* exponential(scale=1.0, size=None)
@@ -9977,7 +9977,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
/* "mtrand.pyx":1590
* cdef double fscale
- *
+ *
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fscale <= 0:
@@ -9985,7 +9985,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
__pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale);
/* "mtrand.pyx":1591
- *
+ *
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fscale <= 0:
@@ -10009,7 +10009,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_exponential, size, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_54), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -10024,7 +10024,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont1_array_sc(self.internal_state, rk_exponential, size, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -10039,16 +10039,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
/* "mtrand.pyx":1596
* return cont1_array_sc(self.internal_state, rk_exponential, size, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oscale = <ndarray> PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":1598
* PyErr_Clear()
- *
+ *
* oscale = <ndarray> PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
@@ -10062,7 +10062,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
__pyx_t_3 = 0;
/* "mtrand.pyx":1599
- *
+ *
* oscale = <ndarray> PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oscale, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("scale <= 0")
@@ -10110,7 +10110,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_exponential, size, oscale)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -10125,7 +10125,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_40exponential(struct __pyx_obj_6
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
* return cont1_array(self.internal_state, rk_exponential, size, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def standard_exponential(self, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -10168,7 +10168,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_43standard_exponential(PyObject
/* "mtrand.pyx":1603
* return cont1_array(self.internal_state, rk_exponential, size, oscale)
- *
+ *
* def standard_exponential(self, size=None): # <<<<<<<<<<<<<<
* """
* standard_exponential(size=None)
@@ -10225,10 +10225,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_42standard_exponential(struct __
__Pyx_RefNannySetupContext("standard_exponential", 0);
/* "mtrand.pyx":1629
- *
+ *
* """
* return cont0_array(self.internal_state, rk_standard_exponential, size) # <<<<<<<<<<<<<<
- *
+ *
* def standard_gamma(self, shape, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -10268,7 +10268,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_45standard_gamma(PyObject *__pyx
/* "mtrand.pyx":1631
* return cont0_array(self.internal_state, rk_standard_exponential, size)
- *
+ *
* def standard_gamma(self, shape, size=None): # <<<<<<<<<<<<<<
* """
* standard_gamma(shape, size=None)
@@ -10338,7 +10338,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
/* "mtrand.pyx":1701
* cdef double fshape
- *
+ *
* fshape = PyFloat_AsDouble(shape) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fshape <= 0:
@@ -10346,7 +10346,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
__pyx_v_fshape = PyFloat_AsDouble(__pyx_v_shape);
/* "mtrand.pyx":1702
- *
+ *
* fshape = PyFloat_AsDouble(shape)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fshape <= 0:
@@ -10370,7 +10370,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
* if fshape <= 0:
* raise ValueError("shape <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -10385,7 +10385,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
* if fshape <= 0:
* raise ValueError("shape <= 0")
* return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -10400,7 +10400,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
/* "mtrand.pyx":1707
* return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oshape = <ndarray> PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oshape, 0.0)):
@@ -10408,7 +10408,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
PyErr_Clear();
/* "mtrand.pyx":1708
- *
+ *
* PyErr_Clear()
* oshape = <ndarray> PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oshape, 0.0)):
@@ -10471,7 +10471,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
* if np.any(np.less_equal(oshape, 0.0)):
* raise ValueError("shape <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -10486,7 +10486,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_44standard_gamma(struct __pyx_ob
* if np.any(np.less_equal(oshape, 0.0)):
* raise ValueError("shape <= 0")
* return cont1_array(self.internal_state, rk_standard_gamma, size, oshape) # <<<<<<<<<<<<<<
- *
+ *
* def gamma(self, shape, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -10532,7 +10532,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_47gamma(PyObject *__pyx_v_self,
/* "mtrand.pyx":1713
* return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
- *
+ *
* def gamma(self, shape, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* gamma(shape, scale=1.0, size=None)
@@ -10612,7 +10612,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
/* "mtrand.pyx":1786
* cdef double fshape, fscale
- *
+ *
* fshape = PyFloat_AsDouble(shape) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -10620,7 +10620,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
__pyx_v_fshape = PyFloat_AsDouble(__pyx_v_shape);
/* "mtrand.pyx":1787
- *
+ *
* fshape = PyFloat_AsDouble(shape)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -10679,7 +10679,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -10694,7 +10694,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -10709,7 +10709,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
/* "mtrand.pyx":1795
* return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oshape = <ndarray>PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -10717,7 +10717,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
PyErr_Clear();
/* "mtrand.pyx":1796
- *
+ *
* PyErr_Clear()
* oshape = <ndarray>PyArray_FROM_OTF(shape, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -10855,7 +10855,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -10870,7 +10870,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_46gamma(struct __pyx_obj_6mtrand
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
* return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def f(self, dfnum, dfden, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -10916,7 +10916,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_49f(PyObject *__pyx_v_self, PyOb
/* "mtrand.pyx":1804
* return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale)
- *
+ *
* def f(self, dfnum, dfden, size=None): # <<<<<<<<<<<<<<
* """
* f(dfnum, dfden, size=None)
@@ -10996,7 +10996,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
/* "mtrand.pyx":1887
* cdef double fdfnum, fdfden
- *
+ *
* fdfnum = PyFloat_AsDouble(dfnum) # <<<<<<<<<<<<<<
* fdfden = PyFloat_AsDouble(dfden)
* if not PyErr_Occurred():
@@ -11004,7 +11004,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
__pyx_v_fdfnum = PyFloat_AsDouble(__pyx_v_dfnum);
/* "mtrand.pyx":1888
- *
+ *
* fdfnum = PyFloat_AsDouble(dfnum)
* fdfden = PyFloat_AsDouble(dfden) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -11063,7 +11063,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
* if fdfden <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -11078,7 +11078,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
* if fdfden <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -11093,16 +11093,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
/* "mtrand.pyx":1896
* return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":1898
* PyErr_Clear()
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(odfnum, 0.0)):
@@ -11116,7 +11116,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
__pyx_t_3 = 0;
/* "mtrand.pyx":1899
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odfnum, 0.0)):
@@ -11239,7 +11239,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
* if np.any(np.less_equal(odfden, 0.0)):
* raise ValueError("dfden <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_f, size, odfnum, odfden)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_69), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -11254,7 +11254,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_48f(struct __pyx_obj_6mtrand_Ran
* if np.any(np.less_equal(odfden, 0.0)):
* raise ValueError("dfden <= 0")
* return cont2_array(self.internal_state, rk_f, size, odfnum, odfden) # <<<<<<<<<<<<<<
- *
+ *
* def noncentral_f(self, dfnum, dfden, nonc, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -11301,7 +11301,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_51noncentral_f(PyObject *__pyx_v
/* "mtrand.pyx":1906
* return cont2_array(self.internal_state, rk_f, size, odfnum, odfden)
- *
+ *
* def noncentral_f(self, dfnum, dfden, nonc, size=None): # <<<<<<<<<<<<<<
* """
* noncentral_f(dfnum, dfden, nonc, size=None)
@@ -11391,7 +11391,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
/* "mtrand.pyx":1973
* cdef double fdfnum, fdfden, fnonc
- *
+ *
* fdfnum = PyFloat_AsDouble(dfnum) # <<<<<<<<<<<<<<
* fdfden = PyFloat_AsDouble(dfden)
* fnonc = PyFloat_AsDouble(nonc)
@@ -11399,7 +11399,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
__pyx_v_fdfnum = PyFloat_AsDouble(__pyx_v_dfnum);
/* "mtrand.pyx":1974
- *
+ *
* fdfnum = PyFloat_AsDouble(dfnum)
* fdfden = PyFloat_AsDouble(dfden) # <<<<<<<<<<<<<<
* fnonc = PyFloat_AsDouble(nonc)
@@ -11509,7 +11509,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
* raise ValueError("nonc < 0")
* return cont3_array_sc(self.internal_state, rk_noncentral_f, size, # <<<<<<<<<<<<<<
* fdfnum, fdfden, fnonc)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -11517,7 +11517,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
* raise ValueError("nonc < 0")
* return cont3_array_sc(self.internal_state, rk_noncentral_f, size,
* fdfnum, fdfden, fnonc) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__pyx_t_2 = __pyx_f_6mtrand_cont3_array_sc(__pyx_v_self->internal_state, rk_noncentral_f, __pyx_v_size, __pyx_v_fdfnum, __pyx_v_fdfden, __pyx_v_fnonc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -11531,16 +11531,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
/* "mtrand.pyx":1986
* fdfnum, fdfden, fnonc)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":1988
* PyErr_Clear()
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -11554,11 +11554,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
__pyx_t_3 = 0;
/* "mtrand.pyx":1989
- *
+ *
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
- *
+ *
*/
__pyx_t_3 = PyArray_FROM_OTF(__pyx_v_dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -11572,7 +11572,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
* odfnum = <ndarray>PyArray_FROM_OTF(dfnum, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* odfden = <ndarray>PyArray_FROM_OTF(dfden, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
- *
+ *
* if np.any(np.less_equal(odfnum, 1.0)):
*/
__pyx_t_2 = PyArray_FROM_OTF(__pyx_v_nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -11585,7 +11585,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
/* "mtrand.pyx":1992
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
- *
+ *
* if np.any(np.less_equal(odfnum, 1.0)): # <<<<<<<<<<<<<<
* raise ValueError("dfnum <= 1")
* if np.any(np.less_equal(odfden, 0.0)):
@@ -11628,7 +11628,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
if (__pyx_t_1) {
/* "mtrand.pyx":1993
- *
+ *
* if np.any(np.less_equal(odfnum, 1.0)):
* raise ValueError("dfnum <= 1") # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odfden, 0.0)):
@@ -11768,7 +11768,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
* raise ValueError("nonc < 0")
* return cont3_array(self.internal_state, rk_noncentral_f, size, odfnum, # <<<<<<<<<<<<<<
* odfden, ononc)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -11776,7 +11776,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_50noncentral_f(struct __pyx_obj_
* raise ValueError("nonc < 0")
* return cont3_array(self.internal_state, rk_noncentral_f, size, odfnum,
* odfden, ononc) # <<<<<<<<<<<<<<
- *
+ *
* def chisquare(self, df, size=None):
*/
__pyx_t_3 = __pyx_f_6mtrand_cont3_array(__pyx_v_self->internal_state, rk_noncentral_f, __pyx_v_size, __pyx_v_odfnum, __pyx_v_odfden, __pyx_v_ononc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -11821,7 +11821,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_53chisquare(PyObject *__pyx_v_se
/* "mtrand.pyx":2001
* odfden, ononc)
- *
+ *
* def chisquare(self, df, size=None): # <<<<<<<<<<<<<<
* """
* chisquare(df, size=None)
@@ -11891,7 +11891,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
/* "mtrand.pyx":2066
* cdef double fdf
- *
+ *
* fdf = PyFloat_AsDouble(df) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fdf <= 0:
@@ -11899,7 +11899,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
__pyx_v_fdf = PyFloat_AsDouble(__pyx_v_df);
/* "mtrand.pyx":2067
- *
+ *
* fdf = PyFloat_AsDouble(df)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fdf <= 0:
@@ -11923,7 +11923,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
* if fdf <= 0:
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_79), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -11938,7 +11938,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
* if fdf <= 0:
* raise ValueError("df <= 0")
* return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -11953,16 +11953,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
/* "mtrand.pyx":2072
* return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2074
* PyErr_Clear()
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0")
@@ -11976,7 +11976,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
__pyx_t_3 = 0;
/* "mtrand.pyx":2075
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(odf, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("df <= 0")
@@ -12024,7 +12024,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_chisquare, size, odf)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -12039,7 +12039,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_52chisquare(struct __pyx_obj_6mt
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0")
* return cont1_array(self.internal_state, rk_chisquare, size, odf) # <<<<<<<<<<<<<<
- *
+ *
* def noncentral_chisquare(self, df, nonc, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -12084,7 +12084,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_55noncentral_chisquare(PyObject
/* "mtrand.pyx":2079
* return cont1_array(self.internal_state, rk_chisquare, size, odf)
- *
+ *
* def noncentral_chisquare(self, df, nonc, size=None): # <<<<<<<<<<<<<<
* """
* noncentral_chisquare(df, nonc, size=None)
@@ -12247,7 +12247,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
* raise ValueError("nonc <= 0")
* return cont2_array_sc(self.internal_state, rk_noncentral_chisquare, # <<<<<<<<<<<<<<
* size, fdf, fnonc)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -12255,7 +12255,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
* raise ValueError("nonc <= 0")
* return cont2_array_sc(self.internal_state, rk_noncentral_chisquare,
* size, fdf, fnonc) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__pyx_t_2 = __pyx_f_6mtrand_cont2_array_sc(__pyx_v_self->internal_state, rk_noncentral_chisquare, __pyx_v_size, __pyx_v_fdf, __pyx_v_fnonc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -12269,16 +12269,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
/* "mtrand.pyx":2160
* size, fdf, fnonc)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2162
* PyErr_Clear()
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(odf, 0.0)):
@@ -12292,7 +12292,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
__pyx_t_3 = 0;
/* "mtrand.pyx":2163
- *
+ *
* odf = <ndarray>PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* ononc = <ndarray>PyArray_FROM_OTF(nonc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odf, 0.0)):
@@ -12431,7 +12431,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
* raise ValueError("nonc < 0")
* return cont2_array(self.internal_state, rk_noncentral_chisquare, size, # <<<<<<<<<<<<<<
* odf, ononc)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -12439,7 +12439,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_54noncentral_chisquare(struct __
* raise ValueError("nonc < 0")
* return cont2_array(self.internal_state, rk_noncentral_chisquare, size,
* odf, ononc) # <<<<<<<<<<<<<<
- *
+ *
* def standard_cauchy(self, size=None):
*/
__pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_noncentral_chisquare, __pyx_v_size, __pyx_v_odf, __pyx_v_ononc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -12482,7 +12482,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_57standard_cauchy(PyObject *__py
/* "mtrand.pyx":2171
* odf, ononc)
- *
+ *
* def standard_cauchy(self, size=None): # <<<<<<<<<<<<<<
* """
* standard_cauchy(size=None)
@@ -12539,10 +12539,10 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_56standard_cauchy(struct __pyx_o
__Pyx_RefNannySetupContext("standard_cauchy", 0);
/* "mtrand.pyx":2230
- *
+ *
* """
* return cont0_array(self.internal_state, rk_standard_cauchy, size) # <<<<<<<<<<<<<<
- *
+ *
* def standard_t(self, df, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -12582,7 +12582,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_59standard_t(PyObject *__pyx_v_s
/* "mtrand.pyx":2232
* return cont0_array(self.internal_state, rk_standard_cauchy, size)
- *
+ *
* def standard_t(self, df, size=None): # <<<<<<<<<<<<<<
* """
* standard_t(df, size=None)
@@ -12652,7 +12652,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
/* "mtrand.pyx":2320
* cdef double fdf
- *
+ *
* fdf = PyFloat_AsDouble(df) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fdf <= 0:
@@ -12660,7 +12660,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
__pyx_v_fdf = PyFloat_AsDouble(__pyx_v_df);
/* "mtrand.pyx":2321
- *
+ *
* fdf = PyFloat_AsDouble(df)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fdf <= 0:
@@ -12684,7 +12684,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
* if fdf <= 0:
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -12699,7 +12699,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
* if fdf <= 0:
* raise ValueError("df <= 0")
* return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -12714,16 +12714,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
/* "mtrand.pyx":2326
* return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* odf = <ndarray> PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2328
* PyErr_Clear()
- *
+ *
* odf = <ndarray> PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0")
@@ -12737,7 +12737,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
__pyx_t_3 = 0;
/* "mtrand.pyx":2329
- *
+ *
* odf = <ndarray> PyArray_FROM_OTF(df, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(odf, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("df <= 0")
@@ -12785,7 +12785,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_standard_t, size, odf)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -12800,7 +12800,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_58standard_t(struct __pyx_obj_6m
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0")
* return cont1_array(self.internal_state, rk_standard_t, size, odf) # <<<<<<<<<<<<<<
- *
+ *
* def vonmises(self, mu, kappa, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -12845,7 +12845,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_61vonmises(PyObject *__pyx_v_sel
/* "mtrand.pyx":2333
* return cont1_array(self.internal_state, rk_standard_t, size, odf)
- *
+ *
* def vonmises(self, mu, kappa, size=None): # <<<<<<<<<<<<<<
* """
* vonmises(mu, kappa, size=None)
@@ -12925,7 +12925,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
/* "mtrand.pyx":2412
* cdef double fmu, fkappa
- *
+ *
* fmu = PyFloat_AsDouble(mu) # <<<<<<<<<<<<<<
* fkappa = PyFloat_AsDouble(kappa)
* if not PyErr_Occurred():
@@ -12933,7 +12933,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
__pyx_v_fmu = PyFloat_AsDouble(__pyx_v_mu);
/* "mtrand.pyx":2413
- *
+ *
* fmu = PyFloat_AsDouble(mu)
* fkappa = PyFloat_AsDouble(kappa) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -12966,7 +12966,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
* if fkappa < 0:
* raise ValueError("kappa < 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -12981,7 +12981,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
* if fkappa < 0:
* raise ValueError("kappa < 0")
* return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -12996,16 +12996,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
/* "mtrand.pyx":2419
* return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* omu = <ndarray> PyArray_FROM_OTF(mu, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2421
* PyErr_Clear()
- *
+ *
* omu = <ndarray> PyArray_FROM_OTF(mu, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* okappa = <ndarray> PyArray_FROM_OTF(kappa, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less(okappa, 0.0)):
@@ -13019,7 +13019,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
__pyx_t_3 = 0;
/* "mtrand.pyx":2422
- *
+ *
* omu = <ndarray> PyArray_FROM_OTF(mu, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* okappa = <ndarray> PyArray_FROM_OTF(kappa, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less(okappa, 0.0)):
@@ -13082,7 +13082,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
* if np.any(np.less(okappa, 0.0)):
* raise ValueError("kappa < 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_91), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -13097,7 +13097,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_60vonmises(struct __pyx_obj_6mtr
* if np.any(np.less(okappa, 0.0)):
* raise ValueError("kappa < 0")
* return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa) # <<<<<<<<<<<<<<
- *
+ *
* def pareto(self, a, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -13142,7 +13142,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_63pareto(PyObject *__pyx_v_self,
/* "mtrand.pyx":2427
* return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa)
- *
+ *
* def pareto(self, a, size=None): # <<<<<<<<<<<<<<
* """
* pareto(a, size=None)
@@ -13212,7 +13212,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
/* "mtrand.pyx":2510
* cdef double fa
- *
+ *
* fa = PyFloat_AsDouble(a) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fa <= 0:
@@ -13220,7 +13220,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
__pyx_v_fa = PyFloat_AsDouble(__pyx_v_a);
/* "mtrand.pyx":2511
- *
+ *
* fa = PyFloat_AsDouble(a)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fa <= 0:
@@ -13244,7 +13244,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_pareto, size, fa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -13259,7 +13259,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
* if fa <= 0:
* raise ValueError("a <= 0")
* return cont1_array_sc(self.internal_state, rk_pareto, size, fa) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -13274,16 +13274,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
/* "mtrand.pyx":2516
* return cont1_array_sc(self.internal_state, rk_pareto, size, fa)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2518
* PyErr_Clear()
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
@@ -13297,7 +13297,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
__pyx_t_3 = 0;
/* "mtrand.pyx":2519
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oa, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("a <= 0")
@@ -13345,7 +13345,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_pareto, size, oa)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_93), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -13360,7 +13360,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_62pareto(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
* return cont1_array(self.internal_state, rk_pareto, size, oa) # <<<<<<<<<<<<<<
- *
+ *
* def weibull(self, a, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -13404,7 +13404,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_65weibull(PyObject *__pyx_v_self
/* "mtrand.pyx":2523
* return cont1_array(self.internal_state, rk_pareto, size, oa)
- *
+ *
* def weibull(self, a, size=None): # <<<<<<<<<<<<<<
* """
* weibull(a, size=None)
@@ -13474,7 +13474,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
/* "mtrand.pyx":2610
* cdef double fa
- *
+ *
* fa = PyFloat_AsDouble(a) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fa <= 0:
@@ -13482,7 +13482,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
__pyx_v_fa = PyFloat_AsDouble(__pyx_v_a);
/* "mtrand.pyx":2611
- *
+ *
* fa = PyFloat_AsDouble(a)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fa <= 0:
@@ -13506,7 +13506,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_weibull, size, fa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -13521,7 +13521,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
* if fa <= 0:
* raise ValueError("a <= 0")
* return cont1_array_sc(self.internal_state, rk_weibull, size, fa) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -13536,16 +13536,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
/* "mtrand.pyx":2616
* return cont1_array_sc(self.internal_state, rk_weibull, size, fa)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2618
* PyErr_Clear()
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
@@ -13559,7 +13559,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
__pyx_t_3 = 0;
/* "mtrand.pyx":2619
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oa, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("a <= 0")
@@ -13607,7 +13607,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_weibull, size, oa)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -13622,7 +13622,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_64weibull(struct __pyx_obj_6mtra
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
* return cont1_array(self.internal_state, rk_weibull, size, oa) # <<<<<<<<<<<<<<
- *
+ *
* def power(self, a, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -13666,7 +13666,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_67power(PyObject *__pyx_v_self,
/* "mtrand.pyx":2623
* return cont1_array(self.internal_state, rk_weibull, size, oa)
- *
+ *
* def power(self, a, size=None): # <<<<<<<<<<<<<<
* """
* power(a, size=None)
@@ -13736,7 +13736,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
/* "mtrand.pyx":2719
* cdef double fa
- *
+ *
* fa = PyFloat_AsDouble(a) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fa <= 0:
@@ -13744,7 +13744,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
__pyx_v_fa = PyFloat_AsDouble(__pyx_v_a);
/* "mtrand.pyx":2720
- *
+ *
* fa = PyFloat_AsDouble(a)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fa <= 0:
@@ -13768,7 +13768,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_power, size, fa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_96), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -13783,7 +13783,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
* if fa <= 0:
* raise ValueError("a <= 0")
* return cont1_array_sc(self.internal_state, rk_power, size, fa) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -13798,16 +13798,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
/* "mtrand.pyx":2725
* return cont1_array_sc(self.internal_state, rk_power, size, fa)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":2727
* PyErr_Clear()
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
@@ -13821,7 +13821,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
__pyx_t_3 = 0;
/* "mtrand.pyx":2728
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oa, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("a <= 0")
@@ -13869,7 +13869,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_power, size, oa)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_97), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -13884,7 +13884,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_66power(struct __pyx_obj_6mtrand
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0")
* return cont1_array(self.internal_state, rk_power, size, oa) # <<<<<<<<<<<<<<
- *
+ *
* def laplace(self, loc=0.0, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -13931,7 +13931,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_69laplace(PyObject *__pyx_v_self
/* "mtrand.pyx":2732
* return cont1_array(self.internal_state, rk_power, size, oa)
- *
+ *
* def laplace(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* laplace(loc=0.0, scale=1.0, size=None)
@@ -14013,7 +14013,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
/* "mtrand.pyx":2808
* cdef double floc, fscale
- *
+ *
* floc = PyFloat_AsDouble(loc) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -14021,7 +14021,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
__pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc);
/* "mtrand.pyx":2809
- *
+ *
* floc = PyFloat_AsDouble(loc)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -14054,7 +14054,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14069,7 +14069,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -14084,7 +14084,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
/* "mtrand.pyx":2815
* return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14092,7 +14092,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
PyErr_Clear();
/* "mtrand.pyx":2816
- *
+ *
* PyErr_Clear()
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14166,7 +14166,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_101), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14181,7 +14181,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_68laplace(struct __pyx_obj_6mtra
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
* return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def gumbel(self, loc=0.0, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -14229,7 +14229,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_71gumbel(PyObject *__pyx_v_self,
/* "mtrand.pyx":2822
* return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
- *
+ *
* def gumbel(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* gumbel(loc=0.0, scale=1.0, size=None)
@@ -14311,7 +14311,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
/* "mtrand.pyx":2939
* cdef double floc, fscale
- *
+ *
* floc = PyFloat_AsDouble(loc) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -14319,7 +14319,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
__pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc);
/* "mtrand.pyx":2940
- *
+ *
* floc = PyFloat_AsDouble(loc)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -14352,7 +14352,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_104), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14367,7 +14367,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -14382,7 +14382,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
/* "mtrand.pyx":2946
* return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14390,7 +14390,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
PyErr_Clear();
/* "mtrand.pyx":2947
- *
+ *
* PyErr_Clear()
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14464,7 +14464,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14479,7 +14479,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_70gumbel(struct __pyx_obj_6mtran
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
* return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def logistic(self, loc=0.0, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -14527,7 +14527,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_73logistic(PyObject *__pyx_v_sel
/* "mtrand.pyx":2953
* return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
- *
+ *
* def logistic(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* logistic(loc=0.0, scale=1.0, size=None)
@@ -14609,7 +14609,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
/* "mtrand.pyx":3027
* cdef double floc, fscale
- *
+ *
* floc = PyFloat_AsDouble(loc) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -14617,7 +14617,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
__pyx_v_floc = PyFloat_AsDouble(__pyx_v_loc);
/* "mtrand.pyx":3028
- *
+ *
* floc = PyFloat_AsDouble(loc)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -14650,7 +14650,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_108), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14665,7 +14665,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -14680,7 +14680,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
/* "mtrand.pyx":3034
* return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14688,7 +14688,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
PyErr_Clear();
/* "mtrand.pyx":3035
- *
+ *
* PyErr_Clear()
* oloc = PyArray_FROM_OTF(loc, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -14762,7 +14762,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_109), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14777,7 +14777,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_72logistic(struct __pyx_obj_6mtr
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0")
* return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def lognormal(self, mean=0.0, sigma=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -14825,7 +14825,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_75lognormal(PyObject *__pyx_v_se
/* "mtrand.pyx":3041
* return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
- *
+ *
* def lognormal(self, mean=0.0, sigma=1.0, size=None): # <<<<<<<<<<<<<<
* """
* lognormal(mean=0.0, sigma=1.0, size=None)
@@ -14907,25 +14907,25 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
/* "mtrand.pyx":3146
* cdef double fmean, fsigma
- *
+ *
* fmean = PyFloat_AsDouble(mean) # <<<<<<<<<<<<<<
* fsigma = PyFloat_AsDouble(sigma)
- *
+ *
*/
__pyx_v_fmean = PyFloat_AsDouble(__pyx_v_mean);
/* "mtrand.pyx":3147
- *
+ *
* fmean = PyFloat_AsDouble(mean)
* fsigma = PyFloat_AsDouble(sigma) # <<<<<<<<<<<<<<
- *
+ *
* if not PyErr_Occurred():
*/
__pyx_v_fsigma = PyFloat_AsDouble(__pyx_v_sigma);
/* "mtrand.pyx":3149
* fsigma = PyFloat_AsDouble(sigma)
- *
+ *
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fsigma <= 0:
* raise ValueError("sigma <= 0")
@@ -14934,7 +14934,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
if (__pyx_t_1) {
/* "mtrand.pyx":3150
- *
+ *
* if not PyErr_Occurred():
* if fsigma <= 0: # <<<<<<<<<<<<<<
* raise ValueError("sigma <= 0")
@@ -14948,7 +14948,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
* if fsigma <= 0:
* raise ValueError("sigma <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_113), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -14963,7 +14963,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
* if fsigma <= 0:
* raise ValueError("sigma <= 0")
* return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -14978,16 +14978,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
/* "mtrand.pyx":3154
* return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3156
* PyErr_Clear()
- *
+ *
* omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* osigma = PyArray_FROM_OTF(sigma, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(osigma, 0.0)):
@@ -14999,7 +14999,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
__pyx_t_2 = 0;
/* "mtrand.pyx":3157
- *
+ *
* omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* osigma = PyArray_FROM_OTF(sigma, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(osigma, 0.0)):
@@ -15060,7 +15060,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
* if np.any(np.less_equal(osigma, 0.0)):
* raise ValueError("sigma <= 0.0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_115), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -15075,7 +15075,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_74lognormal(struct __pyx_obj_6mt
* if np.any(np.less_equal(osigma, 0.0)):
* raise ValueError("sigma <= 0.0")
* return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma) # <<<<<<<<<<<<<<
- *
+ *
* def rayleigh(self, scale=1.0, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -15121,7 +15121,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_77rayleigh(PyObject *__pyx_v_sel
/* "mtrand.pyx":3162
* return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
- *
+ *
* def rayleigh(self, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* rayleigh(scale=1.0, size=None)
@@ -15193,16 +15193,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
/* "mtrand.pyx":3220
* cdef double fscale
- *
+ *
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
- *
+ *
* if not PyErr_Occurred():
*/
__pyx_v_fscale = PyFloat_AsDouble(__pyx_v_scale);
/* "mtrand.pyx":3222
* fscale = PyFloat_AsDouble(scale)
- *
+ *
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fscale <= 0:
* raise ValueError("scale <= 0")
@@ -15211,7 +15211,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
if (__pyx_t_1) {
/* "mtrand.pyx":3223
- *
+ *
* if not PyErr_Occurred():
* if fscale <= 0: # <<<<<<<<<<<<<<
* raise ValueError("scale <= 0")
@@ -15225,7 +15225,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_117), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -15240,7 +15240,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -15255,16 +15255,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
/* "mtrand.pyx":3227
* return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3229
* PyErr_Clear()
- *
+ *
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0.0")
@@ -15278,7 +15278,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
__pyx_t_3 = 0;
/* "mtrand.pyx":3230
- *
+ *
* oscale = <ndarray>PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oscale, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("scale <= 0.0")
@@ -15326,7 +15326,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0.0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_rayleigh, size, oscale)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_119), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -15341,7 +15341,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_76rayleigh(struct __pyx_obj_6mtr
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0.0")
* return cont1_array(self.internal_state, rk_rayleigh, size, oscale) # <<<<<<<<<<<<<<
- *
+ *
* def wald(self, mean, scale, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -15386,7 +15386,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_79wald(PyObject *__pyx_v_self, P
/* "mtrand.pyx":3234
* return cont1_array(self.internal_state, rk_rayleigh, size, oscale)
- *
+ *
* def wald(self, mean, scale, size=None): # <<<<<<<<<<<<<<
* """
* wald(mean, scale, size=None)
@@ -15466,7 +15466,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":3300
* cdef double fmean, fscale
- *
+ *
* fmean = PyFloat_AsDouble(mean) # <<<<<<<<<<<<<<
* fscale = PyFloat_AsDouble(scale)
* if not PyErr_Occurred():
@@ -15474,7 +15474,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
__pyx_v_fmean = PyFloat_AsDouble(__pyx_v_mean);
/* "mtrand.pyx":3301
- *
+ *
* fmean = PyFloat_AsDouble(mean)
* fscale = PyFloat_AsDouble(scale) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -15533,7 +15533,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -15548,7 +15548,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
* if fscale <= 0:
* raise ValueError("scale <= 0")
* return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -15563,7 +15563,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":3309
* return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -15571,7 +15571,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
PyErr_Clear();
/* "mtrand.pyx":3310
- *
+ *
* PyErr_Clear()
* omean = PyArray_FROM_OTF(mean, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oscale = PyArray_FROM_OTF(scale, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -15704,7 +15704,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
* elif np.any(np.less_equal(oscale,0.0)):
* raise ValueError("scale <= 0.0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_wald, size, omean, oscale)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_125), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -15719,8 +15719,8 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_78wald(struct __pyx_obj_6mtrand_
* elif np.any(np.less_equal(oscale,0.0)):
* raise ValueError("scale <= 0.0")
* return cont2_array(self.internal_state, rk_wald, size, omean, oscale) # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __pyx_f_6mtrand_cont2_array(__pyx_v_self->internal_state, rk_wald, __pyx_v_size, __pyx_v_omean, __pyx_v_oscale); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -15765,8 +15765,8 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_81triangular(PyObject *__pyx_v_s
PyObject* values[4] = {0,0,0,0};
/* "mtrand.pyx":3320
- *
- *
+ *
+ *
* def triangular(self, left, mode, right, size=None): # <<<<<<<<<<<<<<
* """
* triangular(left, mode, right, size=None)
@@ -15856,7 +15856,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
/* "mtrand.pyx":3380
* cdef double fleft, fmode, fright
- *
+ *
* fleft = PyFloat_AsDouble(left) # <<<<<<<<<<<<<<
* fright = PyFloat_AsDouble(right)
* fmode = PyFloat_AsDouble(mode)
@@ -15864,7 +15864,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
__pyx_v_fleft = PyFloat_AsDouble(__pyx_v_left);
/* "mtrand.pyx":3381
- *
+ *
* fleft = PyFloat_AsDouble(left)
* fright = PyFloat_AsDouble(right) # <<<<<<<<<<<<<<
* fmode = PyFloat_AsDouble(mode)
@@ -15974,7 +15974,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* raise ValueError("left == right")
* return cont3_array_sc(self.internal_state, rk_triangular, size, fleft, # <<<<<<<<<<<<<<
* fmode, fright)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -15982,7 +15982,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* raise ValueError("left == right")
* return cont3_array_sc(self.internal_state, rk_triangular, size, fleft,
* fmode, fright) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__pyx_t_2 = __pyx_f_6mtrand_cont3_array_sc(__pyx_v_self->internal_state, rk_triangular, __pyx_v_size, __pyx_v_fleft, __pyx_v_fmode, __pyx_v_fright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -15996,7 +15996,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
/* "mtrand.pyx":3393
* fmode, fright)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
* oleft = <ndarray>PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* omode = <ndarray>PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -16004,7 +16004,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
PyErr_Clear();
/* "mtrand.pyx":3394
- *
+ *
* PyErr_Clear()
* oleft = <ndarray>PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* omode = <ndarray>PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
@@ -16023,7 +16023,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* oleft = <ndarray>PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* omode = <ndarray>PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* oright = <ndarray>PyArray_FROM_OTF(right, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
- *
+ *
*/
__pyx_t_3 = PyArray_FROM_OTF(__pyx_v_mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -16037,7 +16037,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* oleft = <ndarray>PyArray_FROM_OTF(left, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* omode = <ndarray>PyArray_FROM_OTF(mode, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* oright = <ndarray>PyArray_FROM_OTF(right, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
- *
+ *
* if np.any(np.greater(oleft, omode)):
*/
__pyx_t_2 = PyArray_FROM_OTF(__pyx_v_right, NPY_DOUBLE, NPY_ARRAY_ALIGNED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -16050,7 +16050,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
/* "mtrand.pyx":3398
* oright = <ndarray>PyArray_FROM_OTF(right, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
- *
+ *
* if np.any(np.greater(oleft, omode)): # <<<<<<<<<<<<<<
* raise ValueError("left > mode")
* if np.any(np.greater(omode, oright)):
@@ -16091,7 +16091,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
if (__pyx_t_1) {
/* "mtrand.pyx":3399
- *
+ *
* if np.any(np.greater(oleft, omode)):
* raise ValueError("left > mode") # <<<<<<<<<<<<<<
* if np.any(np.greater(omode, oright)):
@@ -16227,7 +16227,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* raise ValueError("left == right")
* return cont3_array(self.internal_state, rk_triangular, size, oleft, # <<<<<<<<<<<<<<
* omode, oright)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -16235,7 +16235,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_80triangular(struct __pyx_obj_6m
* raise ValueError("left == right")
* return cont3_array(self.internal_state, rk_triangular, size, oleft,
* omode, oright) # <<<<<<<<<<<<<<
- *
+ *
* # Complicated, discrete distributions:
*/
__pyx_t_2 = __pyx_f_6mtrand_cont3_array(__pyx_v_self->internal_state, rk_triangular, __pyx_v_size, __pyx_v_oleft, __pyx_v_omode, __pyx_v_oright); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -16280,7 +16280,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_83binomial(PyObject *__pyx_v_sel
PyObject* values[3] = {0,0,0};
/* "mtrand.pyx":3408
- *
+ *
* # Complicated, discrete distributions:
* def binomial(self, n, p, size=None): # <<<<<<<<<<<<<<
* """
@@ -16361,7 +16361,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
/* "mtrand.pyx":3493
* cdef double fp
- *
+ *
* fp = PyFloat_AsDouble(p) # <<<<<<<<<<<<<<
* ln = PyInt_AsLong(n)
* if not PyErr_Occurred():
@@ -16369,7 +16369,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
__pyx_v_fp = PyFloat_AsDouble(__pyx_v_p);
/* "mtrand.pyx":3494
- *
+ *
* fp = PyFloat_AsDouble(p)
* ln = PyInt_AsLong(n) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -16453,7 +16453,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
* elif fp > 1:
* raise ValueError("p > 1") # <<<<<<<<<<<<<<
* return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_140), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -16468,7 +16468,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
* elif fp > 1:
* raise ValueError("p > 1")
* return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -16483,16 +16483,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
/* "mtrand.pyx":3504
* return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_LONG, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3506
* PyErr_Clear()
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_LONG, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less(n, 0)):
@@ -16506,7 +16506,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
__pyx_t_3 = 0;
/* "mtrand.pyx":3507
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_LONG, NPY_ARRAY_ALIGNED)
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less(n, 0)):
@@ -16683,7 +16683,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
* if np.any(np.greater(p, 1)):
* raise ValueError("p > 1") # <<<<<<<<<<<<<<
* return discnp_array(self.internal_state, rk_binomial, size, on, op)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_143), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -16698,7 +16698,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_82binomial(struct __pyx_obj_6mtr
* if np.any(np.greater(p, 1)):
* raise ValueError("p > 1")
* return discnp_array(self.internal_state, rk_binomial, size, on, op) # <<<<<<<<<<<<<<
- *
+ *
* def negative_binomial(self, n, p, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -16744,7 +16744,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_85negative_binomial(PyObject *__
/* "mtrand.pyx":3516
* return discnp_array(self.internal_state, rk_binomial, size, on, op)
- *
+ *
* def negative_binomial(self, n, p, size=None): # <<<<<<<<<<<<<<
* """
* negative_binomial(n, p, size=None)
@@ -16824,7 +16824,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
/* "mtrand.pyx":3586
* cdef double fp
- *
+ *
* fp = PyFloat_AsDouble(p) # <<<<<<<<<<<<<<
* fn = PyFloat_AsDouble(n)
* if not PyErr_Occurred():
@@ -16832,7 +16832,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
__pyx_v_fp = PyFloat_AsDouble(__pyx_v_p);
/* "mtrand.pyx":3587
- *
+ *
* fp = PyFloat_AsDouble(p)
* fn = PyFloat_AsDouble(n) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
@@ -16932,7 +16932,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
* raise ValueError("p > 1")
* return discdd_array_sc(self.internal_state, rk_negative_binomial, # <<<<<<<<<<<<<<
* size, fn, fp)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -16940,7 +16940,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
* raise ValueError("p > 1")
* return discdd_array_sc(self.internal_state, rk_negative_binomial,
* size, fn, fp) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__pyx_t_2 = __pyx_f_6mtrand_discdd_array_sc(__pyx_v_self->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_fn, __pyx_v_fp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -16954,16 +16954,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
/* "mtrand.pyx":3598
* size, fn, fp)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3600
* PyErr_Clear()
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(n, 0)):
@@ -16977,7 +16977,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
__pyx_t_3 = 0;
/* "mtrand.pyx":3601
- *
+ *
* on = <ndarray>PyArray_FROM_OTF(n, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(n, 0)):
@@ -17170,7 +17170,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
* raise ValueError("p > 1")
* return discdd_array(self.internal_state, rk_negative_binomial, size, # <<<<<<<<<<<<<<
* on, op)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -17178,7 +17178,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_84negative_binomial(struct __pyx
* raise ValueError("p > 1")
* return discdd_array(self.internal_state, rk_negative_binomial, size,
* on, op) # <<<<<<<<<<<<<<
- *
+ *
* def poisson(self, lam=1.0, size=None):
*/
__pyx_t_3 = __pyx_f_6mtrand_discdd_array(__pyx_v_self->internal_state, rk_negative_binomial, __pyx_v_size, __pyx_v_on, __pyx_v_op); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -17223,7 +17223,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_87poisson(PyObject *__pyx_v_self
/* "mtrand.pyx":3611
* on, op)
- *
+ *
* def poisson(self, lam=1.0, size=None): # <<<<<<<<<<<<<<
* """
* poisson(lam=1.0, size=None)
@@ -17360,7 +17360,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
* if lam > self.poisson_lam_max:
* raise ValueError("lam value too large") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_poisson, size, flam)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_155), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -17375,7 +17375,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
* if lam > self.poisson_lam_max:
* raise ValueError("lam value too large")
* return discd_array_sc(self.internal_state, rk_poisson, size, flam) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -17390,16 +17390,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
/* "mtrand.pyx":3673
* return discd_array_sc(self.internal_state, rk_poisson, size, flam)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* olam = <ndarray>PyArray_FROM_OTF(lam, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3675
* PyErr_Clear()
- *
+ *
* olam = <ndarray>PyArray_FROM_OTF(lam, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less(olam, 0)):
* raise ValueError("lam < 0")
@@ -17413,7 +17413,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
__pyx_t_2 = 0;
/* "mtrand.pyx":3676
- *
+ *
* olam = <ndarray>PyArray_FROM_OTF(lam, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less(olam, 0)): # <<<<<<<<<<<<<<
* raise ValueError("lam < 0")
@@ -17519,7 +17519,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
* if np.any(np.greater(olam, self.poisson_lam_max)):
* raise ValueError("lam value too large.") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_poisson, size, olam)
- *
+ *
*/
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_158), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
@@ -17534,7 +17534,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_86poisson(struct __pyx_obj_6mtra
* if np.any(np.greater(olam, self.poisson_lam_max)):
* raise ValueError("lam value too large.")
* return discd_array(self.internal_state, rk_poisson, size, olam) # <<<<<<<<<<<<<<
- *
+ *
* def zipf(self, a, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -17578,7 +17578,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_89zipf(PyObject *__pyx_v_self, P
/* "mtrand.pyx":3682
* return discd_array(self.internal_state, rk_poisson, size, olam)
- *
+ *
* def zipf(self, a, size=None): # <<<<<<<<<<<<<<
* """
* zipf(a, size=None)
@@ -17648,7 +17648,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":3757
* cdef double fa
- *
+ *
* fa = PyFloat_AsDouble(a) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fa <= 1.0:
@@ -17656,7 +17656,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
__pyx_v_fa = PyFloat_AsDouble(__pyx_v_a);
/* "mtrand.pyx":3758
- *
+ *
* fa = PyFloat_AsDouble(a)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fa <= 1.0:
@@ -17680,7 +17680,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
* if fa <= 1.0:
* raise ValueError("a <= 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_zipf, size, fa)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_160), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -17695,7 +17695,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
* if fa <= 1.0:
* raise ValueError("a <= 1.0")
* return discd_array_sc(self.internal_state, rk_zipf, size, fa) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -17710,16 +17710,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
/* "mtrand.pyx":3763
* return discd_array_sc(self.internal_state, rk_zipf, size, fa)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3765
* PyErr_Clear()
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(oa, 1.0)):
* raise ValueError("a <= 1.0")
@@ -17733,7 +17733,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
__pyx_t_3 = 0;
/* "mtrand.pyx":3766
- *
+ *
* oa = <ndarray>PyArray_FROM_OTF(a, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(oa, 1.0)): # <<<<<<<<<<<<<<
* raise ValueError("a <= 1.0")
@@ -17781,7 +17781,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
* if np.any(np.less_equal(oa, 1.0)):
* raise ValueError("a <= 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_zipf, size, oa)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_161), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -17796,7 +17796,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_88zipf(struct __pyx_obj_6mtrand_
* if np.any(np.less_equal(oa, 1.0)):
* raise ValueError("a <= 1.0")
* return discd_array(self.internal_state, rk_zipf, size, oa) # <<<<<<<<<<<<<<
- *
+ *
* def geometric(self, p, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -17840,7 +17840,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_91geometric(PyObject *__pyx_v_se
/* "mtrand.pyx":3770
* return discd_array(self.internal_state, rk_zipf, size, oa)
- *
+ *
* def geometric(self, p, size=None): # <<<<<<<<<<<<<<
* """
* geometric(p, size=None)
@@ -17910,7 +17910,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
/* "mtrand.pyx":3818
* cdef double fp
- *
+ *
* fp = PyFloat_AsDouble(p) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fp < 0.0:
@@ -17918,7 +17918,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
__pyx_v_fp = PyFloat_AsDouble(__pyx_v_p);
/* "mtrand.pyx":3819
- *
+ *
* fp = PyFloat_AsDouble(p)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fp < 0.0:
@@ -17968,7 +17968,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
* if fp > 1.0:
* raise ValueError("p > 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_geometric, size, fp)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_165), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -17983,7 +17983,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
* if fp > 1.0:
* raise ValueError("p > 1.0")
* return discd_array_sc(self.internal_state, rk_geometric, size, fp) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -17998,16 +17998,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
/* "mtrand.pyx":3826
* return discd_array_sc(self.internal_state, rk_geometric, size, fp)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
- *
+ *
+ *
*/
PyErr_Clear();
/* "mtrand.pyx":3829
- *
- *
+ *
+ *
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less(op, 0.0)):
* raise ValueError("p < 0.0")
@@ -18021,7 +18021,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
__pyx_t_3 = 0;
/* "mtrand.pyx":3830
- *
+ *
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less(op, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("p < 0.0")
@@ -18129,7 +18129,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
* if np.any(np.greater(op, 1.0)):
* raise ValueError("p > 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_geometric, size, op)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_167), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -18144,7 +18144,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_90geometric(struct __pyx_obj_6mt
* if np.any(np.greater(op, 1.0)):
* raise ValueError("p > 1.0")
* return discd_array(self.internal_state, rk_geometric, size, op) # <<<<<<<<<<<<<<
- *
+ *
* def hypergeometric(self, ngood, nbad, nsample, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -18190,7 +18190,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_93hypergeometric(PyObject *__pyx
/* "mtrand.pyx":3836
* return discd_array(self.internal_state, rk_geometric, size, op)
- *
+ *
* def hypergeometric(self, ngood, nbad, nsample, size=None): # <<<<<<<<<<<<<<
* """
* hypergeometric(ngood, nbad, nsample, size=None)
@@ -18281,7 +18281,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
/* "mtrand.pyx":3924
* cdef long lngood, lnbad, lnsample
- *
+ *
* lngood = PyInt_AsLong(ngood) # <<<<<<<<<<<<<<
* lnbad = PyInt_AsLong(nbad)
* lnsample = PyInt_AsLong(nsample)
@@ -18289,7 +18289,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
__pyx_v_lngood = PyInt_AsLong(__pyx_v_ngood);
/* "mtrand.pyx":3925
- *
+ *
* lngood = PyInt_AsLong(ngood)
* lnbad = PyInt_AsLong(nbad) # <<<<<<<<<<<<<<
* lnsample = PyInt_AsLong(nsample)
@@ -18425,7 +18425,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
* raise ValueError("ngood + nbad < nsample")
* return discnmN_array_sc(self.internal_state, rk_hypergeometric, size, # <<<<<<<<<<<<<<
* lngood, lnbad, lnsample)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -18433,7 +18433,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
* raise ValueError("ngood + nbad < nsample")
* return discnmN_array_sc(self.internal_state, rk_hypergeometric, size,
* lngood, lnbad, lnsample) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__pyx_t_2 = __pyx_f_6mtrand_discnmN_array_sc(__pyx_v_self->internal_state, rk_hypergeometric, __pyx_v_size, __pyx_v_lngood, __pyx_v_lnbad, __pyx_v_lnsample); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -18447,16 +18447,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
/* "mtrand.pyx":3939
* lngood, lnbad, lnsample)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* ongood = <ndarray>PyArray_FROM_OTF(ngood, NPY_LONG, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":3941
* PyErr_Clear()
- *
+ *
* ongood = <ndarray>PyArray_FROM_OTF(ngood, NPY_LONG, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* onbad = <ndarray>PyArray_FROM_OTF(nbad, NPY_LONG, NPY_ARRAY_ALIGNED)
* onsample = <ndarray>PyArray_FROM_OTF(nsample, NPY_LONG, NPY_ARRAY_ALIGNED)
@@ -18470,7 +18470,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
__pyx_t_3 = 0;
/* "mtrand.pyx":3942
- *
+ *
* ongood = <ndarray>PyArray_FROM_OTF(ngood, NPY_LONG, NPY_ARRAY_ALIGNED)
* onbad = <ndarray>PyArray_FROM_OTF(nbad, NPY_LONG, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* onsample = <ndarray>PyArray_FROM_OTF(nsample, NPY_LONG, NPY_ARRAY_ALIGNED)
@@ -18753,7 +18753,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
* raise ValueError("ngood + nbad < nsample")
* return discnmN_array(self.internal_state, rk_hypergeometric, size, # <<<<<<<<<<<<<<
* ongood, onbad, onsample)
- *
+ *
*/
__Pyx_XDECREF(__pyx_r);
@@ -18761,7 +18761,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_92hypergeometric(struct __pyx_ob
* raise ValueError("ngood + nbad < nsample")
* return discnmN_array(self.internal_state, rk_hypergeometric, size,
* ongood, onbad, onsample) # <<<<<<<<<<<<<<
- *
+ *
* def logseries(self, p, size=None):
*/
__pyx_t_6 = __pyx_f_6mtrand_discnmN_array(__pyx_v_self->internal_state, rk_hypergeometric, __pyx_v_size, __pyx_v_ongood, __pyx_v_onbad, __pyx_v_onsample); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -18807,7 +18807,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_95logseries(PyObject *__pyx_v_se
/* "mtrand.pyx":3955
* ongood, onbad, onsample)
- *
+ *
* def logseries(self, p, size=None): # <<<<<<<<<<<<<<
* """
* logseries(p, size=None)
@@ -18877,7 +18877,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
/* "mtrand.pyx":4032
* cdef double fp
- *
+ *
* fp = PyFloat_AsDouble(p) # <<<<<<<<<<<<<<
* if not PyErr_Occurred():
* if fp <= 0.0:
@@ -18885,7 +18885,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
__pyx_v_fp = PyFloat_AsDouble(__pyx_v_p);
/* "mtrand.pyx":4033
- *
+ *
* fp = PyFloat_AsDouble(p)
* if not PyErr_Occurred(): # <<<<<<<<<<<<<<
* if fp <= 0.0:
@@ -18935,7 +18935,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
* if fp >= 1.0:
* raise ValueError("p >= 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_logseries, size, fp)
- *
+ *
*/
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_183), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -18950,7 +18950,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
* if fp >= 1.0:
* raise ValueError("p >= 1.0")
* return discd_array_sc(self.internal_state, rk_logseries, size, fp) # <<<<<<<<<<<<<<
- *
+ *
* PyErr_Clear()
*/
__Pyx_XDECREF(__pyx_r);
@@ -18965,16 +18965,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
/* "mtrand.pyx":4040
* return discd_array_sc(self.internal_state, rk_logseries, size, fp)
- *
+ *
* PyErr_Clear() # <<<<<<<<<<<<<<
- *
+ *
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
*/
PyErr_Clear();
/* "mtrand.pyx":4042
* PyErr_Clear()
- *
+ *
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED) # <<<<<<<<<<<<<<
* if np.any(np.less_equal(op, 0.0)):
* raise ValueError("p <= 0.0")
@@ -18988,7 +18988,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
__pyx_t_3 = 0;
/* "mtrand.pyx":4043
- *
+ *
* op = <ndarray>PyArray_FROM_OTF(p, NPY_DOUBLE, NPY_ARRAY_ALIGNED)
* if np.any(np.less_equal(op, 0.0)): # <<<<<<<<<<<<<<
* raise ValueError("p <= 0.0")
@@ -19096,7 +19096,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
* if np.any(np.greater_equal(op, 1.0)):
* raise ValueError("p >= 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_logseries, size, op)
- *
+ *
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_185), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -19111,7 +19111,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_94logseries(struct __pyx_obj_6mt
* if np.any(np.greater_equal(op, 1.0)):
* raise ValueError("p >= 1.0")
* return discd_array(self.internal_state, rk_logseries, size, op) # <<<<<<<<<<<<<<
- *
+ *
* # Multivariate distributions:
*/
__Pyx_XDECREF(__pyx_r);
@@ -19155,7 +19155,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_97multivariate_normal(PyObject *
PyObject* values[3] = {0,0,0};
/* "mtrand.pyx":4050
- *
+ *
* # Multivariate distributions:
* def multivariate_normal(self, mean, cov, size=None): # <<<<<<<<<<<<<<
* """
@@ -19632,7 +19632,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_96multivariate_normal(struct __p
/* "mtrand.pyx":4172
* # decomposition of cov is such an A.
- *
+ *
* from numpy.dual import svd # <<<<<<<<<<<<<<
* # XXX: we really should be doing this by Cholesky decomposition
* (u,s,v) = svd(cov)
@@ -19681,13 +19681,13 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_96multivariate_normal(struct __p
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 2);
} else {
- __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_2 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 2);
}
__Pyx_INCREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_1);
@@ -19811,7 +19811,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_96multivariate_normal(struct __p
* np.add(mean,x,x)
* x.shape = tuple(final_shape) # <<<<<<<<<<<<<<
* return x
- *
+ *
*/
__pyx_t_2 = ((PyObject *)PyList_AsTuple(__pyx_v_final_shape)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
@@ -19822,7 +19822,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_96multivariate_normal(struct __p
* np.add(mean,x,x)
* x.shape = tuple(final_shape)
* return x # <<<<<<<<<<<<<<
- *
+ *
* def multinomial(self, npy_intp n, object pvals, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -19874,7 +19874,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_99multinomial(PyObject *__pyx_v_
/* "mtrand.pyx":4182
* return x
- *
+ *
* def multinomial(self, npy_intp n, object pvals, size=None): # <<<<<<<<<<<<<<
* """
* multinomial(n, pvals, size=None)
@@ -19962,7 +19962,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
/* "mtrand.pyx":4241
* cdef double Sum
- *
+ *
* d = len(pvals) # <<<<<<<<<<<<<<
* parr = <ndarray>PyArray_ContiguousFromObject(pvals, NPY_DOUBLE, 1, 1)
* pix = <double*>PyArray_DATA(parr)
@@ -19971,11 +19971,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
__pyx_v_d = __pyx_t_1;
/* "mtrand.pyx":4242
- *
+ *
* d = len(pvals)
* parr = <ndarray>PyArray_ContiguousFromObject(pvals, NPY_DOUBLE, 1, 1) # <<<<<<<<<<<<<<
* pix = <double*>PyArray_DATA(parr)
- *
+ *
*/
__pyx_t_2 = PyArray_ContiguousFromObject(__pyx_v_pvals, NPY_DOUBLE, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -19989,26 +19989,26 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
* d = len(pvals)
* parr = <ndarray>PyArray_ContiguousFromObject(pvals, NPY_DOUBLE, 1, 1)
* pix = <double*>PyArray_DATA(parr) # <<<<<<<<<<<<<<
- *
+ *
* if kahan_sum(pix, d-1) > (1.0 + 1e-12):
*/
__pyx_v_pix = ((double *)PyArray_DATA(arrayObject_parr));
/* "mtrand.pyx":4245
* pix = <double*>PyArray_DATA(parr)
- *
+ *
* if kahan_sum(pix, d-1) > (1.0 + 1e-12): # <<<<<<<<<<<<<<
* raise ValueError("sum(pvals[:-1]) > 1.0")
- *
+ *
*/
__pyx_t_4 = (__pyx_f_6mtrand_kahan_sum(__pyx_v_pix, (__pyx_v_d - 1)) > (1.0 + 1e-12));
if (__pyx_t_4) {
/* "mtrand.pyx":4246
- *
+ *
* if kahan_sum(pix, d-1) > (1.0 + 1e-12):
* raise ValueError("sum(pvals[:-1]) > 1.0") # <<<<<<<<<<<<<<
- *
+ *
* if size is None:
*/
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_195), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -20022,7 +20022,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
/* "mtrand.pyx":4248
* raise ValueError("sum(pvals[:-1]) > 1.0")
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* shape = (d,)
* elif type(size) is int:
@@ -20031,7 +20031,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
if (__pyx_t_4) {
/* "mtrand.pyx":4249
- *
+ *
* if size is None:
* shape = (d,) # <<<<<<<<<<<<<<
* elif type(size) is int:
@@ -20086,7 +20086,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
* shape = (size, d)
* else:
* shape = size + (d,) # <<<<<<<<<<<<<<
- *
+ *
* multin = np.zeros(shape, int)
*/
__pyx_t_3 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_d); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -20106,7 +20106,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
/* "mtrand.pyx":4255
* shape = size + (d,)
- *
+ *
* multin = np.zeros(shape, int) # <<<<<<<<<<<<<<
* mnarr = <ndarray>multin
* mnix = <long*>PyArray_DATA(mnarr)
@@ -20132,7 +20132,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
__pyx_t_5 = 0;
/* "mtrand.pyx":4256
- *
+ *
* multin = np.zeros(shape, int)
* mnarr = <ndarray>multin # <<<<<<<<<<<<<<
* mnix = <long*>PyArray_DATA(mnarr)
@@ -20264,7 +20264,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
* Sum = Sum - pix[j]
* if dn > 0: # <<<<<<<<<<<<<<
* mnix[i+d-1] = dn
- *
+ *
*/
__pyx_t_4 = (__pyx_v_dn > 0);
if (__pyx_t_4) {
@@ -20273,7 +20273,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
* Sum = Sum - pix[j]
* if dn > 0:
* mnix[i+d-1] = dn # <<<<<<<<<<<<<<
- *
+ *
* i = i + d
*/
(__pyx_v_mnix[((__pyx_v_i + __pyx_v_d) - 1)]) = __pyx_v_dn;
@@ -20283,9 +20283,9 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
/* "mtrand.pyx":4271
* mnix[i+d-1] = dn
- *
+ *
* i = i + d # <<<<<<<<<<<<<<
- *
+ *
* return multin
*/
__pyx_v_i = (__pyx_v_i + __pyx_v_d);
@@ -20293,9 +20293,9 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_98multinomial(struct __pyx_obj_6
/* "mtrand.pyx":4273
* i = i + d
- *
+ *
* return multin # <<<<<<<<<<<<<<
- *
+ *
* def dirichlet(self, object alpha, size=None):
*/
__Pyx_XDECREF(__pyx_r);
@@ -20339,7 +20339,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_101dirichlet(PyObject *__pyx_v_s
/* "mtrand.pyx":4275
* return multin
- *
+ *
* def dirichlet(self, object alpha, size=None): # <<<<<<<<<<<<<<
* """
* dirichlet(alpha, size=None)
@@ -20420,7 +20420,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
/* "mtrand.pyx":4361
* cdef double acc, invacc
- *
+ *
* k = len(alpha) # <<<<<<<<<<<<<<
* alpha_arr = <ndarray>PyArray_ContiguousFromObject(alpha, NPY_DOUBLE, 1, 1)
* alpha_data = <double*>PyArray_DATA(alpha_arr)
@@ -20429,11 +20429,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
__pyx_v_k = __pyx_t_1;
/* "mtrand.pyx":4362
- *
+ *
* k = len(alpha)
* alpha_arr = <ndarray>PyArray_ContiguousFromObject(alpha, NPY_DOUBLE, 1, 1) # <<<<<<<<<<<<<<
* alpha_data = <double*>PyArray_DATA(alpha_arr)
- *
+ *
*/
__pyx_t_2 = PyArray_ContiguousFromObject(__pyx_v_alpha, NPY_DOUBLE, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -20447,14 +20447,14 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
* k = len(alpha)
* alpha_arr = <ndarray>PyArray_ContiguousFromObject(alpha, NPY_DOUBLE, 1, 1)
* alpha_data = <double*>PyArray_DATA(alpha_arr) # <<<<<<<<<<<<<<
- *
+ *
* if size is None:
*/
__pyx_v_alpha_data = ((double *)PyArray_DATA(__pyx_v_alpha_arr));
/* "mtrand.pyx":4365
* alpha_data = <double*>PyArray_DATA(alpha_arr)
- *
+ *
* if size is None: # <<<<<<<<<<<<<<
* shape = (k,)
* elif type(size) is int:
@@ -20463,7 +20463,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
if (__pyx_t_4) {
/* "mtrand.pyx":4366
- *
+ *
* if size is None:
* shape = (k,) # <<<<<<<<<<<<<<
* elif type(size) is int:
@@ -20518,7 +20518,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
* shape = (size, k)
* else:
* shape = size + (k,) # <<<<<<<<<<<<<<
- *
+ *
* diric = np.zeros(shape, np.float64)
*/
__pyx_t_3 = __Pyx_PyInt_to_py_npy_intp(__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -20538,7 +20538,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
/* "mtrand.pyx":4372
* shape = size + (k,)
- *
+ *
* diric = np.zeros(shape, np.float64) # <<<<<<<<<<<<<<
* val_arr = <ndarray>diric
* val_data= <double*>PyArray_DATA(val_arr)
@@ -20569,11 +20569,11 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
__pyx_t_5 = 0;
/* "mtrand.pyx":4373
- *
+ *
* diric = np.zeros(shape, np.float64)
* val_arr = <ndarray>diric # <<<<<<<<<<<<<<
* val_data= <double*>PyArray_DATA(val_arr)
- *
+ *
*/
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_diric)));
__pyx_v_val_arr = ((PyArrayObject *)__pyx_v_diric);
@@ -20582,14 +20582,14 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
* diric = np.zeros(shape, np.float64)
* val_arr = <ndarray>diric
* val_data= <double*>PyArray_DATA(val_arr) # <<<<<<<<<<<<<<
- *
+ *
* i = 0
*/
__pyx_v_val_data = ((double *)PyArray_DATA(__pyx_v_val_arr));
/* "mtrand.pyx":4376
* val_data= <double*>PyArray_DATA(val_arr)
- *
+ *
* i = 0 # <<<<<<<<<<<<<<
* totsize = PyArray_SIZE(val_arr)
* while i < totsize:
@@ -20597,7 +20597,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
__pyx_v_i = 0;
/* "mtrand.pyx":4377
- *
+ *
* i = 0
* totsize = PyArray_SIZE(val_arr) # <<<<<<<<<<<<<<
* while i < totsize:
@@ -20688,7 +20688,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
* for j from 0 <= j < k:
* val_data[i+j] = val_data[i+j] * invacc # <<<<<<<<<<<<<<
* i = i + k
- *
+ *
*/
(__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) = ((__pyx_v_val_data[(__pyx_v_i + __pyx_v_j)]) * __pyx_v_invacc);
}
@@ -20697,7 +20697,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
* for j from 0 <= j < k:
* val_data[i+j] = val_data[i+j] * invacc
* i = i + k # <<<<<<<<<<<<<<
- *
+ *
* return diric
*/
__pyx_v_i = (__pyx_v_i + __pyx_v_k);
@@ -20705,9 +20705,9 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_100dirichlet(struct __pyx_obj_6m
/* "mtrand.pyx":4388
* i = i + k
- *
+ *
* return diric # <<<<<<<<<<<<<<
- *
+ *
* # Shuffling and permutations:
*/
__Pyx_XDECREF(__pyx_r);
@@ -20746,7 +20746,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_103shuffle(PyObject *__pyx_v_sel
}
/* "mtrand.pyx":4391
- *
+ *
* # Shuffling and permutations:
* def shuffle(self, object x): # <<<<<<<<<<<<<<
* """
@@ -20774,16 +20774,16 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_102shuffle(struct __pyx_obj_6mtr
/* "mtrand.pyx":4426
* cdef npy_intp i, j
- *
+ *
* i = len(x) - 1 # <<<<<<<<<<<<<<
- *
+ *
* # Logic adapted from random.shuffle()
*/
__pyx_t_1 = PyObject_Length(__pyx_v_x); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_i = (__pyx_t_1 - 1);
/* "mtrand.pyx":4429
- *
+ *
* # Logic adapted from random.shuffle()
* if isinstance(x, np.ndarray) and x.ndim > 1: # <<<<<<<<<<<<<<
* # For a multi-dimensional ndarray, indexing returns a view onto
@@ -20936,7 +20936,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_102shuffle(struct __pyx_obj_6mtr
* j = rk_interval(i, self.internal_state)
* x[i], x[j] = x[j], x[i] # <<<<<<<<<<<<<<
* i = i - 1
- *
+ *
*/
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_x, __pyx_v_j, sizeof(npy_intp), __Pyx_PyInt_to_py_npy_intp, 0, 1, 1); if (!__pyx_t_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
@@ -20951,7 +20951,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_102shuffle(struct __pyx_obj_6mtr
* j = rk_interval(i, self.internal_state)
* x[i], x[j] = x[j], x[i]
* i = i - 1 # <<<<<<<<<<<<<<
- *
+ *
* def permutation(self, object x):
*/
__pyx_v_i = (__pyx_v_i - 1);
@@ -20989,7 +20989,7 @@ static PyObject *__pyx_pw_6mtrand_11RandomState_105permutation(PyObject *__pyx_v
/* "mtrand.pyx":4449
* i = i - 1
- *
+ *
* def permutation(self, object x): # <<<<<<<<<<<<<<
* """
* permutation(x)
@@ -21009,7 +21009,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_104permutation(struct __pyx_obj_
__Pyx_RefNannySetupContext("permutation", 0);
/* "mtrand.pyx":4485
- *
+ *
* """
* if isinstance(x, (int, long, np.integer)): # <<<<<<<<<<<<<<
* arr = np.arange(x)
@@ -21093,7 +21093,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_104permutation(struct __pyx_obj_
* arr = np.array(x)
* self.shuffle(arr) # <<<<<<<<<<<<<<
* return arr
- *
+ *
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__shuffle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -21112,7 +21112,7 @@ static PyObject *__pyx_pf_6mtrand_11RandomState_104permutation(struct __pyx_obj_
* arr = np.array(x)
* self.shuffle(arr)
* return arr # <<<<<<<<<<<<<<
- *
+ *
* _rand = RandomState()
*/
__Pyx_XDECREF(__pyx_r);
@@ -21799,10 +21799,10 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));
/* "mtrand.pyx":877
- *
+ *
* if lo >= hi :
* raise ValueError("low >= high") # <<<<<<<<<<<<<<
- *
+ *
* diff = <unsigned long>hi - <unsigned long>lo - 1UL
*/
__pyx_k_tuple_16 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_15)); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -21846,7 +21846,7 @@ static int __Pyx_InitCachedConstants(void) {
* pop_size = a.shape[0]
* if pop_size is 0:
* raise ValueError("a must be non-empty") # <<<<<<<<<<<<<<
- *
+ *
* if None != p:
*/
__pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -21890,7 +21890,7 @@ static int __Pyx_InitCachedConstants(void) {
* raise ValueError("probabilities are not non-negative")
* if not np.allclose(p.sum(), 1):
* raise ValueError("probabilities do not sum to 1") # <<<<<<<<<<<<<<
- *
+ *
* shape = size
*/
__pyx_k_tuple_33 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_32)); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -21902,7 +21902,7 @@ static int __Pyx_InitCachedConstants(void) {
* if size > pop_size:
* raise ValueError("Cannot take a larger sample than " # <<<<<<<<<<<<<<
* "population when 'replace=False'")
- *
+ *
*/
__pyx_k_tuple_35 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_34)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_35);
@@ -21923,7 +21923,7 @@ static int __Pyx_InitCachedConstants(void) {
* if shape is None and isinstance(idx, np.ndarray):
* # In most cases a scalar will have been made an array
* idx = idx.item(0) # <<<<<<<<<<<<<<
- *
+ *
* #Use samples as indices for a if a is array-like
*/
__pyx_k_tuple_38 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -21946,7 +21946,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_normal, size, floc, fscale)
- *
+ *
*/
__pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_45);
@@ -21957,7 +21957,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_normal, size, oloc, oscale)
- *
+ *
*/
__pyx_k_tuple_46 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_46);
@@ -21979,7 +21979,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fb <= 0:
* raise ValueError("b <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_beta, size, fa, fb)
- *
+ *
*/
__pyx_k_tuple_50 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_49)); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_50);
@@ -22001,7 +22001,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(ob, 0)):
* raise ValueError("b <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_beta, size, oa, ob)
- *
+ *
*/
__pyx_k_tuple_52 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_49)); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_52);
@@ -22012,7 +22012,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_exponential, size, fscale)
- *
+ *
*/
__pyx_k_tuple_54 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_54);
@@ -22023,7 +22023,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_exponential, size, oscale)
- *
+ *
*/
__pyx_k_tuple_55 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_55);
@@ -22034,7 +22034,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fshape <= 0:
* raise ValueError("shape <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_standard_gamma, size, fshape)
- *
+ *
*/
__pyx_k_tuple_57 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_57);
@@ -22045,7 +22045,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oshape, 0.0)):
* raise ValueError("shape <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
- *
+ *
*/
__pyx_k_tuple_58 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_56)); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_58);
@@ -22067,7 +22067,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_gamma, size, fshape, fscale)
- *
+ *
*/
__pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_61);
@@ -22089,7 +22089,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_gamma, size, oshape, oscale)
- *
+ *
*/
__pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_63);
@@ -22111,7 +22111,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fdfden <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_f, size, fdfnum, fdfden)
- *
+ *
*/
__pyx_k_tuple_65 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_65);
@@ -22133,7 +22133,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(odfden, 0.0)):
* raise ValueError("dfden <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_f, size, odfnum, odfden)
- *
+ *
*/
__pyx_k_tuple_69 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_68)); if (unlikely(!__pyx_k_tuple_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_69);
@@ -22173,7 +22173,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
/* "mtrand.pyx":1993
- *
+ *
* if np.any(np.less_equal(odfnum, 1.0)):
* raise ValueError("dfnum <= 1") # <<<<<<<<<<<<<<
* if np.any(np.less_equal(odfden, 0.0)):
@@ -22210,7 +22210,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fdf <= 0:
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_chisquare, size, fdf)
- *
+ *
*/
__pyx_k_tuple_79 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_78)); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_79);
@@ -22221,7 +22221,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_chisquare, size, odf)
- *
+ *
*/
__pyx_k_tuple_80 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_78)); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_80);
@@ -22276,7 +22276,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fdf <= 0:
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_standard_t, size, fdf)
- *
+ *
*/
__pyx_k_tuple_87 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_78)); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_87);
@@ -22287,7 +22287,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(odf, 0.0)):
* raise ValueError("df <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_standard_t, size, odf)
- *
+ *
*/
__pyx_k_tuple_88 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_78)); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_88);
@@ -22298,7 +22298,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fkappa < 0:
* raise ValueError("kappa < 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_vonmises, size, fmu, fkappa)
- *
+ *
*/
__pyx_k_tuple_90 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_89)); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_90);
@@ -22309,7 +22309,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less(okappa, 0.0)):
* raise ValueError("kappa < 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_vonmises, size, omu, okappa)
- *
+ *
*/
__pyx_k_tuple_91 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_89)); if (unlikely(!__pyx_k_tuple_91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_91);
@@ -22320,7 +22320,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_pareto, size, fa)
- *
+ *
*/
__pyx_k_tuple_92 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_92);
@@ -22331,7 +22331,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_pareto, size, oa)
- *
+ *
*/
__pyx_k_tuple_93 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_93);
@@ -22342,7 +22342,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_weibull, size, fa)
- *
+ *
*/
__pyx_k_tuple_94 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_94);
@@ -22353,7 +22353,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_weibull, size, oa)
- *
+ *
*/
__pyx_k_tuple_95 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_95);
@@ -22364,7 +22364,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fa <= 0:
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_power, size, fa)
- *
+ *
*/
__pyx_k_tuple_96 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_96);
@@ -22375,7 +22375,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oa, 0.0)):
* raise ValueError("a <= 0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_power, size, oa)
- *
+ *
*/
__pyx_k_tuple_97 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_47)); if (unlikely(!__pyx_k_tuple_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_97);
@@ -22386,7 +22386,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_laplace, size, floc, fscale)
- *
+ *
*/
__pyx_k_tuple_100 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_100);
@@ -22397,7 +22397,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
- *
+ *
*/
__pyx_k_tuple_101 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_101);
@@ -22408,7 +22408,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_gumbel, size, floc, fscale)
- *
+ *
*/
__pyx_k_tuple_104 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_104);
@@ -22419,7 +22419,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
- *
+ *
*/
__pyx_k_tuple_105 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_105);
@@ -22430,7 +22430,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_logistic, size, floc, fscale)
- *
+ *
*/
__pyx_k_tuple_108 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_108);
@@ -22441,7 +22441,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
- *
+ *
*/
__pyx_k_tuple_109 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_109);
@@ -22452,7 +22452,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fsigma <= 0:
* raise ValueError("sigma <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_lognormal, size, fmean, fsigma)
- *
+ *
*/
__pyx_k_tuple_113 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_112)); if (unlikely(!__pyx_k_tuple_113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_113);
@@ -22463,7 +22463,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(osigma, 0.0)):
* raise ValueError("sigma <= 0.0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
- *
+ *
*/
__pyx_k_tuple_115 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_114)); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_115);
@@ -22474,7 +22474,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont1_array_sc(self.internal_state, rk_rayleigh, size, fscale)
- *
+ *
*/
__pyx_k_tuple_117 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_117);
@@ -22485,7 +22485,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oscale, 0.0)):
* raise ValueError("scale <= 0.0") # <<<<<<<<<<<<<<
* return cont1_array(self.internal_state, rk_rayleigh, size, oscale)
- *
+ *
*/
__pyx_k_tuple_119 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_118)); if (unlikely(!__pyx_k_tuple_119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_119);
@@ -22507,7 +22507,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fscale <= 0:
* raise ValueError("scale <= 0") # <<<<<<<<<<<<<<
* return cont2_array_sc(self.internal_state, rk_wald, size, fmean, fscale)
- *
+ *
*/
__pyx_k_tuple_122 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_122);
@@ -22529,7 +22529,7 @@ static int __Pyx_InitCachedConstants(void) {
* elif np.any(np.less_equal(oscale,0.0)):
* raise ValueError("scale <= 0.0") # <<<<<<<<<<<<<<
* return cont2_array(self.internal_state, rk_wald, size, omean, oscale)
- *
+ *
*/
__pyx_k_tuple_125 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_118)); if (unlikely(!__pyx_k_tuple_125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_125);
@@ -22569,7 +22569,7 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_131));
/* "mtrand.pyx":3399
- *
+ *
* if np.any(np.greater(oleft, omode)):
* raise ValueError("left > mode") # <<<<<<<<<<<<<<
* if np.any(np.greater(omode, oright)):
@@ -22628,7 +22628,7 @@ static int __Pyx_InitCachedConstants(void) {
* elif fp > 1:
* raise ValueError("p > 1") # <<<<<<<<<<<<<<
* return discnp_array_sc(self.internal_state, rk_binomial, size, ln, fp)
- *
+ *
*/
__pyx_k_tuple_140 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_139)); if (unlikely(!__pyx_k_tuple_140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_140);
@@ -22661,7 +22661,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.greater(p, 1)):
* raise ValueError("p > 1") # <<<<<<<<<<<<<<
* return discnp_array(self.internal_state, rk_binomial, size, on, op)
- *
+ *
*/
__pyx_k_tuple_143 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_139)); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_143);
@@ -22749,7 +22749,7 @@ static int __Pyx_InitCachedConstants(void) {
* if lam > self.poisson_lam_max:
* raise ValueError("lam value too large") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_poisson, size, flam)
- *
+ *
*/
__pyx_k_tuple_155 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_154)); if (unlikely(!__pyx_k_tuple_155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_155);
@@ -22771,7 +22771,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.greater(olam, self.poisson_lam_max)):
* raise ValueError("lam value too large.") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_poisson, size, olam)
- *
+ *
*/
__pyx_k_tuple_158 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_157)); if (unlikely(!__pyx_k_tuple_158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_158);
@@ -22782,7 +22782,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fa <= 1.0:
* raise ValueError("a <= 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_zipf, size, fa)
- *
+ *
*/
__pyx_k_tuple_160 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_159)); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_160);
@@ -22793,7 +22793,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.less_equal(oa, 1.0)):
* raise ValueError("a <= 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_zipf, size, oa)
- *
+ *
*/
__pyx_k_tuple_161 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_159)); if (unlikely(!__pyx_k_tuple_161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_161);
@@ -22815,7 +22815,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fp > 1.0:
* raise ValueError("p > 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_geometric, size, fp)
- *
+ *
*/
__pyx_k_tuple_165 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_164)); if (unlikely(!__pyx_k_tuple_165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_165);
@@ -22837,7 +22837,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.greater(op, 1.0)):
* raise ValueError("p > 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_geometric, size, op)
- *
+ *
*/
__pyx_k_tuple_167 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_164)); if (unlikely(!__pyx_k_tuple_167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_167);
@@ -22947,7 +22947,7 @@ static int __Pyx_InitCachedConstants(void) {
* if fp >= 1.0:
* raise ValueError("p >= 1.0") # <<<<<<<<<<<<<<
* return discd_array_sc(self.internal_state, rk_logseries, size, fp)
- *
+ *
*/
__pyx_k_tuple_183 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_182)); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_183);
@@ -22969,7 +22969,7 @@ static int __Pyx_InitCachedConstants(void) {
* if np.any(np.greater_equal(op, 1.0)):
* raise ValueError("p >= 1.0") # <<<<<<<<<<<<<<
* return discd_array(self.internal_state, rk_logseries, size, op)
- *
+ *
*/
__pyx_k_tuple_185 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_182)); if (unlikely(!__pyx_k_tuple_185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_k_tuple_185);
@@ -23020,10 +23020,10 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_GIVEREF(__pyx_k_slice_192);
/* "mtrand.pyx":4246
- *
+ *
* if kahan_sum(pix, d-1) > (1.0 + 1e-12):
* raise ValueError("sum(pvals[:-1]) > 1.0") # <<<<<<<<<<<<<<
- *
+ *
* if size is None:
*/
__pyx_k_tuple_195 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_194)); if (unlikely(!__pyx_k_tuple_195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23045,7 +23045,7 @@ static int __Pyx_InitCachedConstants(void) {
* """
* cdef rk_state *internal_state
* poisson_lam_max = np.iinfo('l').max - np.sqrt(np.iinfo('l').max)*10 # <<<<<<<<<<<<<<
- *
+ *
* def __init__(self, seed=None):
*/
__pyx_k_tuple_197 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__l)); if (unlikely(!__pyx_k_tuple_197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23170,20 +23170,20 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/*--- Execution code ---*/
/* "mtrand.pyx":124
- *
+ *
* # Initialize numpy
* import_array() # <<<<<<<<<<<<<<
- *
+ *
* import numpy as np
*/
import_array();
/* "mtrand.pyx":126
* import_array()
- *
+ *
* import numpy as np # <<<<<<<<<<<<<<
* import operator
- *
+ *
*/
__pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
@@ -23191,10 +23191,10 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "mtrand.pyx":127
- *
+ *
* import numpy as np
* import operator # <<<<<<<<<<<<<<
- *
+ *
* cdef object cont0_array(rk_state *state, rk_cont0 func, object size):
*/
__pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23206,7 +23206,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* """
* cdef rk_state *internal_state
* poisson_lam_max = np.iinfo('l').max - np.sqrt(np.iinfo('l').max)*10 # <<<<<<<<<<<<<<
- *
+ *
* def __init__(self, seed=None):
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23257,8 +23257,8 @@ PyMODINIT_FUNC PyInit_mtrand(void)
PyType_Modified(__pyx_ptype_6mtrand_RandomState);
/* "mtrand.pyx":920
- *
- *
+ *
+ *
* def choice(self, a, size=None, replace=True, p=None): # <<<<<<<<<<<<<<
* """
* choice(a, size=None, replace=True, p=None)
@@ -23270,8 +23270,8 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__pyx_t_4 = 0;
/* "mtrand.pyx":1092
- *
- *
+ *
+ *
* def uniform(self, low=0.0, high=1.0, size=None): # <<<<<<<<<<<<<<
* """
* uniform(low=0.0, high=1.0, size=1)
@@ -23289,7 +23289,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":1390
* return cont0_array(self.internal_state, rk_gauss, size)
- *
+ *
* def normal(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* normal(loc=0.0, scale=1.0, size=None)
@@ -23307,7 +23307,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":1549
* return cont2_array(self.internal_state, rk_beta, size, oa, ob)
- *
+ *
* def exponential(self, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* exponential(scale=1.0, size=None)
@@ -23320,7 +23320,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":1713
* return cont1_array(self.internal_state, rk_standard_gamma, size, oshape)
- *
+ *
* def gamma(self, shape, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* gamma(shape, scale=1.0, size=None)
@@ -23333,7 +23333,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":2732
* return cont1_array(self.internal_state, rk_power, size, oa)
- *
+ *
* def laplace(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* laplace(loc=0.0, scale=1.0, size=None)
@@ -23351,7 +23351,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":2822
* return cont2_array(self.internal_state, rk_laplace, size, oloc, oscale)
- *
+ *
* def gumbel(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* gumbel(loc=0.0, scale=1.0, size=None)
@@ -23369,7 +23369,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":2953
* return cont2_array(self.internal_state, rk_gumbel, size, oloc, oscale)
- *
+ *
* def logistic(self, loc=0.0, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* logistic(loc=0.0, scale=1.0, size=None)
@@ -23387,7 +23387,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":3041
* return cont2_array(self.internal_state, rk_logistic, size, oloc, oscale)
- *
+ *
* def lognormal(self, mean=0.0, sigma=1.0, size=None): # <<<<<<<<<<<<<<
* """
* lognormal(mean=0.0, sigma=1.0, size=None)
@@ -23405,7 +23405,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":3162
* return cont2_array(self.internal_state, rk_lognormal, size, omean, osigma)
- *
+ *
* def rayleigh(self, scale=1.0, size=None): # <<<<<<<<<<<<<<
* """
* rayleigh(scale=1.0, size=None)
@@ -23418,7 +23418,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":3611
* on, op)
- *
+ *
* def poisson(self, lam=1.0, size=None): # <<<<<<<<<<<<<<
* """
* poisson(lam=1.0, size=None)
@@ -23431,7 +23431,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":4492
* return arr
- *
+ *
* _rand = RandomState() # <<<<<<<<<<<<<<
* seed = _rand.seed
* get_state = _rand.get_state
@@ -23442,7 +23442,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "mtrand.pyx":4493
- *
+ *
* _rand = RandomState()
* seed = _rand.seed # <<<<<<<<<<<<<<
* get_state = _rand.get_state
@@ -23941,7 +23941,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* rayleigh = _rand.rayleigh
* wald = _rand.wald # <<<<<<<<<<<<<<
* triangular = _rand.triangular
- *
+ *
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
@@ -23955,7 +23955,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* rayleigh = _rand.rayleigh
* wald = _rand.wald
* triangular = _rand.triangular # <<<<<<<<<<<<<<
- *
+ *
* binomial = _rand.binomial
*/
__pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23968,7 +23968,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":4529
* triangular = _rand.triangular
- *
+ *
* binomial = _rand.binomial # <<<<<<<<<<<<<<
* negative_binomial = _rand.negative_binomial
* poisson = _rand.poisson
@@ -23982,7 +23982,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "mtrand.pyx":4530
- *
+ *
* binomial = _rand.binomial
* negative_binomial = _rand.negative_binomial # <<<<<<<<<<<<<<
* poisson = _rand.poisson
@@ -24046,7 +24046,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* geometric = _rand.geometric
* hypergeometric = _rand.hypergeometric # <<<<<<<<<<<<<<
* logseries = _rand.logseries
- *
+ *
*/
__pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
@@ -24060,7 +24060,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* geometric = _rand.geometric
* hypergeometric = _rand.hypergeometric
* logseries = _rand.logseries # <<<<<<<<<<<<<<
- *
+ *
* multivariate_normal = _rand.multivariate_normal
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -24073,7 +24073,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":4537
* logseries = _rand.logseries
- *
+ *
* multivariate_normal = _rand.multivariate_normal # <<<<<<<<<<<<<<
* multinomial = _rand.multinomial
* dirichlet = _rand.dirichlet
@@ -24087,11 +24087,11 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "mtrand.pyx":4538
- *
+ *
* multivariate_normal = _rand.multivariate_normal
* multinomial = _rand.multinomial # <<<<<<<<<<<<<<
* dirichlet = _rand.dirichlet
- *
+ *
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
@@ -24105,7 +24105,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
* multivariate_normal = _rand.multivariate_normal
* multinomial = _rand.multinomial
* dirichlet = _rand.dirichlet # <<<<<<<<<<<<<<
- *
+ *
* shuffle = _rand.shuffle
*/
__pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___rand); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -24118,7 +24118,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
/* "mtrand.pyx":4541
* dirichlet = _rand.dirichlet
- *
+ *
* shuffle = _rand.shuffle # <<<<<<<<<<<<<<
* permutation = _rand.permutation
*/
@@ -24131,7 +24131,7 @@ PyMODINIT_FUNC PyInit_mtrand(void)
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "mtrand.pyx":4542
- *
+ *
* shuffle = _rand.shuffle
* permutation = _rand.permutation # <<<<<<<<<<<<<<
*/
diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py
index 5497bd9ce..3816a2194 100644
--- a/numpy/testing/noseclasses.py
+++ b/numpy/testing/noseclasses.py
@@ -122,7 +122,7 @@ class NumpyOutputChecker(doctest.OutputChecker):
if not ret:
if "#random" in want:
return True
-
+
# it would be useful to normalize endianness so that
# bigendian machines don't fail all the tests (and there are
# actually some bigendian examples in the doctests). Let's try
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index 79ae79765..481b6189d 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -457,4 +457,3 @@ class NoseTester(object):
add_plugins = [Unplugger('doctest')]
return nose.run(argv=argv, addplugins=add_plugins)
-
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index 235b9e0ba..ca09e3b7d 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -1580,4 +1580,3 @@ def gen_alignment_data(dtype=float32, type='binary', max_size=24):
class IgnoreException(Exception):
"Ignoring this exception due to disabled feature"
-