Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
94128d8a
Verified
Commit
94128d8a
authored
Feb 26, 2020
by
Justin Carpentier
Browse files
core: fix signatures
parent
78efea55
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/numpy-allocator.hpp
View file @
94128d8a
...
...
@@ -41,9 +41,9 @@ namespace eigenpy
enum
{
NPY_ARRAY_MEMORY_CONTIGUOUS
=
SimilarMatrixType
::
IsRowMajor
?
NPY_ARRAY_CARRAY
:
NPY_ARRAY_FARRAY
};
PyArrayObject
*
pyArray
=
(
PyArrayObject
*
)
call_PyArray_New
(
nd
,
shape
,
NumpyEquivalentType
<
Scalar
>::
type_code
,
mat
.
data
(),
NPY_ARRAY_MEMORY_CONTIGUOUS
|
NPY_ARRAY_ALIGNED
);
NumpyEquivalentType
<
Scalar
>::
type_code
,
mat
.
data
(),
NPY_ARRAY_MEMORY_CONTIGUOUS
|
NPY_ARRAY_ALIGNED
);
return
pyArray
;
}
...
...
@@ -69,9 +69,9 @@ namespace eigenpy
enum
{
NPY_ARRAY_MEMORY_CONTIGUOUS_RO
=
SimilarMatrixType
::
IsRowMajor
?
NPY_ARRAY_CARRAY_RO
:
NPY_ARRAY_FARRAY_RO
};
PyArrayObject
*
pyArray
=
(
PyArrayObject
*
)
call_PyArray_New
(
nd
,
shape
,
NumpyEquivalentType
<
Scalar
>::
type_code
,
const_cast
<
SimilarMatrixType
&>
(
mat
.
derived
()).
data
(),
NPY_ARRAY_MEMORY_CONTIGUOUS_RO
|
NPY_ARRAY_ALIGNED
);
NumpyEquivalentType
<
Scalar
>::
type_code
,
const_cast
<
SimilarMatrixType
&>
(
mat
.
derived
()).
data
(),
NPY_ARRAY_MEMORY_CONTIGUOUS_RO
|
NPY_ARRAY_ALIGNED
);
return
pyArray
;
}
...
...
include/eigenpy/numpy.hpp
View file @
94128d8a
...
...
@@ -35,9 +35,9 @@ namespace eigenpy
#if defined _WIN32 || defined __CYGWIN__
namespace
eigenpy
{
EIGENPY_DLLEXPORT
Py
Array
Object
*
call_PyArray_SimpleNew
(
npy_
int
p
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
);
EIGENPY_DLLEXPORT
PyObject
*
call_PyArray_SimpleNew
(
int
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
);
EIGENPY_DLLEXPORT
Py
Array
Object
*
call_PyArray_New
(
npy_
int
p
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
,
void
*
data_ptr
,
npy_intp
options
);
EIGENPY_DLLEXPORT
PyObject
*
call_PyArray_New
(
int
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
,
void
*
data_ptr
,
npy_intp
options
);
EIGENPY_DLLEXPORT
int
call_PyArray_ObjectType
(
PyObject
*
,
int
);
}
...
...
src/numpy.cpp
View file @
94128d8a
...
...
@@ -17,12 +17,12 @@ namespace eigenpy
#if defined _WIN32 || defined __CYGWIN__
Py
Array
Object
*
call_PyArray_SimpleNew
(
npy_
int
p
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
)
PyObject
*
call_PyArray_SimpleNew
(
int
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
)
{
return
PyArray_SimpleNew
(
nd
,
shape
,
np_type
);
return
(
PyArrayObject
*
)
PyArray_SimpleNew
(
nd
,
shape
,
np_type
);
}
Py
Array
Object
*
call_PyArray_New
(
npy_
int
p
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
,
void
*
data_ptr
,
npy_intp
options
)
PyObject
*
call_PyArray_New
(
int
nd
,
npy_intp
*
shape
,
NPY_TYPES
np_type
,
void
*
data_ptr
,
npy_intp
options
)
{
return
PyArray_New
(
&
PyArray_Type
,
nd
,
shape
,
np_type
,
NULL
,
data_ptr
,
0
,
options
,
NULL
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment