@@ -360,29 +360,6 @@ template <> struct select_npy_type<uint64_t> {
360
360
const static NPY_TYPES type = NPY_UINT64;
361
361
};
362
362
363
- // TODO change to Vector template so useable for Eigen vectors,
364
- // should be enough since it also provides the end and begin methods
365
- template <typename Vector> PyObject *get_array (const Vector &v) {
366
- detail::_interpreter::get (); // interpreter needs to be initialized for the
367
- // numpy commands to work
368
- NPY_TYPES type = select_npy_type<typename Vector::value_type>::type;
369
- if (type == NPY_NOTYPE) {
370
- std::vector<double > vd (v.size ());
371
- npy_intp vsize = v.size ();
372
- // Eigen Vectors do not support begin/end() in the currently stable version
373
- // this can be changed once Eigen 3.4. is released
374
- std::copy (v.data (), v.data () + v.size (), vd.begin ());
375
- PyObject *varray =
376
- PyArray_SimpleNewFromData (1 , &vsize, NPY_DOUBLE, (void *)(vd.data ()));
377
- return varray;
378
- }
379
-
380
- npy_intp vsize = v.size ();
381
- PyObject *varray =
382
- PyArray_SimpleNewFromData (1 , &vsize, type, (void *)(v.data ()));
383
- return varray;
384
- }
385
-
386
363
template <typename Vector> PyObject *get_array (const Vector &v) {
387
364
detail::_interpreter::get (); // interpreter needs to be initialized for the
388
365
// numpy commands to work
0 commit comments