summaryrefslogtreecommitdiff
path: root/numpy/doc/swig
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/doc/swig')
-rw-r--r--numpy/doc/swig/numpy.i18
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/doc/swig/numpy.i b/numpy/doc/swig/numpy.i
index bb5fcef4f..e63ba3c21 100644
--- a/numpy/doc/swig/numpy.i
+++ b/numpy/doc/swig/numpy.i
@@ -445,7 +445,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE IN_ARRAY1[ANY])
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE IN_ARRAY1[ANY])
@@ -467,7 +467,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1)
@@ -490,7 +490,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1)
@@ -513,7 +513,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE IN_ARRAY2[ANY][ANY])
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE IN_ARRAY2[ANY][ANY])
@@ -535,7 +535,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2)
@@ -559,7 +559,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2)
@@ -583,7 +583,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE IN_ARRAY3[ANY][ANY][ANY])
@@ -606,7 +606,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3)
@@ -632,7 +632,7 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
(DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)
{
- $1 = ($input != NULL);
+ $1 = is_array($input) || PySequence_Check($input);
}
%typemap(in)
(DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3)