Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
22201d08
Commit
22201d08
authored
Jul 06, 2016
by
Wenzel Jakob
Committed by
GitHub
Jul 06, 2016
Browse files
Merge pull request #268 from bennorth/stricter-test
Tighten check() test in eigen.py
parents
f57133aa
150a0fa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
example/eigen.py
example/eigen.py
+3
-1
example/eigen.ref
example/eigen.ref
+1
-0
No files found.
example/eigen.py
View file @
22201d08
...
...
@@ -22,7 +22,9 @@ ref = np.array(
def
check
(
mat
):
return
'OK'
if
np
.
sum
(
mat
-
ref
)
==
0
else
'NOT OK'
return
'OK'
if
np
.
sum
(
abs
(
mat
-
ref
))
==
0
else
'NOT OK'
print
(
"should_give_NOT_OK = %s"
%
check
(
ref
[:,
::
-
1
]))
print
(
"fixed_r = %s"
%
check
(
fixed_r
()))
print
(
"fixed_c = %s"
%
check
(
fixed_c
()))
...
...
example/eigen.ref
View file @
22201d08
should_give_NOT_OK = NOT OK
fixed_r = OK
fixed_c = OK
pt_r(fixed_r) = OK
...
...
Write
Preview
Markdown
is supported
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