Skip to content
GitLab
Menu
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
275fd43a
Unverified
Commit
275fd43a
authored
Apr 16, 2021
by
Justin Carpentier
Committed by
GitHub
Apr 16, 2021
Browse files
Merge pull request #228 from jcarpent/devel
Add CI for OSX
parents
503d7d6e
c3e322eb
Pipeline
#14073
passed with stage
in 12 minutes and 31 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.github/workflows/macos-linux-conda.yml
0 → 100644
View file @
275fd43a
name
:
CI - EigenPy for Mac OS X/Linux via Conda
on
:
[
push
,
pull_request
]
jobs
:
eigenpy-conda
:
name
:
CI - EigenPy on ${{ matrix.os }} via Conda
runs-on
:
${{ matrix.os }}
strategy
:
fail-fast
:
false
matrix
:
os
:
[
"
ubuntu-latest"
,
"
macos-latest"
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Checkout submodules
run
:
|
git submodule update --init
-
uses
:
conda-incubator/setup-miniconda@v2
with
:
activate-environment
:
eigenpy
auto-update-conda
:
true
environment-file
:
.github/workflows/conda/environment.yml
python-version
:
3.8
-
name
:
Install cmake and update conda
shell
:
bash -l {0}
run
:
|
conda activate eigenpy
conda install cmake -c main
-
name
:
Build EigenPy
shell
:
bash -l {0}
run
:
|
conda activate eigenpy
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$(which python3)
make
make build_tests
export CTEST_OUTPUT_ON_FAILURE=1
make test
make install
-
name
:
Uninstall EigenPy
shell
:
bash -l {0}
run
:
|
cd build
make uninstall
cmake
@
3a52692a
Compare
ef309d5a
...
3a52692a
Subproject commit
ef309d5a23037324b48749ab8faf30846dc0e7f0
Subproject commit
3a52692a40839b10f38352c1b06ccfebc0b53f36
include/eigenpy/numpy.hpp
View file @
275fd43a
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
#if defined _WIN32 || defined __CYGWIN__
#if defined _WIN32 || defined __CYGWIN__
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
call_PyArray_
ObjectType(reinterpret_cast<PyObject *>(array), 0)
call_PyArray_
MinScalarType(array)->type_num
#else
#else
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
#define EIGENPY_GET_PY_ARRAY_TYPE(array) \
PyArray_
ObjectType(reinterpret_cast<PyObject *>(array), 0)
PyArray_
MinScalarType(array)->type_num
#endif
#endif
namespace
eigenpy
namespace
eigenpy
...
@@ -51,6 +51,10 @@ namespace eigenpy
...
@@ -51,6 +51,10 @@ namespace eigenpy
EIGENPY_DLLAPI
void
call_PyArray_InitArrFuncs
(
PyArray_ArrFuncs
*
funcs
);
EIGENPY_DLLAPI
void
call_PyArray_InitArrFuncs
(
PyArray_ArrFuncs
*
funcs
);
EIGENPY_DLLAPI
int
call_PyArray_RegisterDataType
(
PyArray_Descr
*
dtype
);
EIGENPY_DLLAPI
int
call_PyArray_RegisterDataType
(
PyArray_Descr
*
dtype
);
EIGENPY_DLLAPI
int
call_PyArray_RegisterCanCast
(
PyArray_Descr
*
descr
,
int
totype
,
NPY_SCALARKIND
scalar
);
EIGENPY_DLLAPI
PyArray_Descr
*
call_PyArray_MinScalarType
(
PyArrayObject
*
arr
);
}
}
#else
#else
#define call_PyArray_Check(py_obj) PyArray_Check(py_obj)
#define call_PyArray_Check(py_obj) PyArray_Check(py_obj)
...
@@ -59,8 +63,10 @@ namespace eigenpy
...
@@ -59,8 +63,10 @@ namespace eigenpy
PyArray_New(py_type_ptr,nd,shape,np_type,NULL,data_ptr,0,options,NULL)
PyArray_New(py_type_ptr,nd,shape,np_type,NULL,data_ptr,0,options,NULL)
#define getPyArrayType() &PyArray_Type
#define getPyArrayType() &PyArray_Type
#define call_PyArray_DescrFromType(typenum) PyArray_DescrFromType(typenum)
#define call_PyArray_DescrFromType(typenum) PyArray_DescrFromType(typenum)
#define call_PyArray_MinScalarType(py_arr) PyArray_MinScalarType(py_arr)
#define call_PyArray_InitArrFuncs(funcs) PyArray_InitArrFuncs(funcs)
#define call_PyArray_InitArrFuncs(funcs) PyArray_InitArrFuncs(funcs)
#define call_PyArray_RegisterDataType(dtype) PyArray_RegisterDataType(dtype)
#define call_PyArray_RegisterDataType(dtype) PyArray_RegisterDataType(dtype)
#define call_PyArray_RegisterCanCast(descr,totype,scalar) PyArray_RegisterCanCast(descr,totype,scalar)
#endif
#endif
#endif // ifndef __eigenpy_numpy_hpp__
#endif // ifndef __eigenpy_numpy_hpp__
include/eigenpy/user-type.hpp
View file @
275fd43a
...
@@ -198,6 +198,9 @@ namespace eigenpy
...
@@ -198,6 +198,9 @@ namespace eigenpy
copyswap
,
copyswapn
,
copyswap
,
copyswapn
,
dotfunc
);
dotfunc
);
call_PyArray_RegisterCanCast
(
call_PyArray_DescrFromType
(
NPY_OBJECT
),
code
,
NPY_NOSCALAR
);
return
code
;
return
code
;
}
}
...
...
src/numpy.cpp
View file @
275fd43a
...
@@ -58,6 +58,16 @@ namespace eigenpy
...
@@ -58,6 +58,16 @@ namespace eigenpy
{
{
return
PyArray_RegisterDataType
(
dtype
);
return
PyArray_RegisterDataType
(
dtype
);
}
}
PyArray_Descr
*
call_PyArray_MinScalarType
(
PyArrayObject
*
arr
)
{
return
PyArray_MinScalarType
(
arr
);
}
int
call_PyArray_RegisterCanCast
(
PyArray_Descr
*
descr
,
int
totype
,
NPY_SCALARKIND
scalar
)
{
return
PyArray_RegisterCanCast
(
descr
,
totype
,
scalar
);
}
#endif
#endif
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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