Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
eigenpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
eigenpy
Commits
cb0c9409
Commit
cb0c9409
authored
6 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[Conversion] Fix bug when converting matrix of dim 1x1
parent
724b2562
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/details.hpp
+11
-1
11 additions, 1 deletion
src/details.hpp
with
11 additions
and
1 deletion
src/details.hpp
+
11
−
1
View file @
cb0c9409
/*
* Copyright 2014, Nicolas Mansard, LAAS-CNRS
* Copyright 2014
-2018
, Nicolas Mansard
and Justin Carpentier
, LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
...
...
@@ -140,6 +140,8 @@ namespace eigenpy
// Determine if obj_ptr can be converted in a Eigenvec
static
void
*
convertible
(
PyArrayObject
*
obj_ptr
)
{
std
::
cout
<<
"call convertible"
<<
std
::
endl
;
if
(
!
PyArray_Check
(
obj_ptr
))
{
#ifndef NDEBUG
...
...
@@ -148,8 +150,15 @@ namespace eigenpy
return
0
;
}
std
::
cout
<<
"PyArray_DIMS(obj_ptr)[0]: "
<<
PyArray_DIMS
(
obj_ptr
)[
0
]
<<
std
::
endl
;
std
::
cout
<<
"PyArray_DIMS(obj_ptr)[1]: "
<<
PyArray_DIMS
(
obj_ptr
)[
1
]
<<
std
::
endl
;
if
(
MatType
::
IsVectorAtCompileTime
)
{
// Special care of scalar matrix of dimension 1x1.
if
(
PyArray_DIMS
(
obj_ptr
)[
0
]
==
1
&&
PyArray_DIMS
(
obj_ptr
)[
1
]
==
1
)
return
obj_ptr
;
if
(
PyArray_DIMS
(
obj_ptr
)[
0
]
>
1
&&
PyArray_DIMS
(
obj_ptr
)[
1
]
>
1
)
{
#ifndef NDEBUG
...
...
@@ -162,6 +171,7 @@ namespace eigenpy
||
((
PyArray_DIMS
(
obj_ptr
)[
1
]
==
1
)
&&
(
MatType
::
RowsAtCompileTime
==
1
)))
{
#ifndef NDEBUG
std
::
cout
<<
"MatType::ColsAtCompileTime: "
<<
MatType
::
ColsAtCompileTime
<<
std
::
endl
;
if
(
MatType
::
ColsAtCompileTime
==
1
)
std
::
cerr
<<
"The object is not a column vector"
<<
std
::
endl
;
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment