Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aganders3 committed Apr 5, 2018
2 parents d9dc0ae + 3da0a71 commit 98d8218
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/PyFI/PyFIArray_WrappedEigen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#ifndef _PYFIARRAY_WRAPPEDEIGEN_CPP_GUARD
#define _PYFIARRAY_WRAPPEDEIGEN_CPP_GUARD

#include <Eigen/Core>
#include <Eigen/Cholesky>
#include <Eigen/QR>
#include <Eigen/Dense>
#include <eigen3/Eigen/Core>
#include <eigen3/Eigen/Cholesky>
#include <eigen3/Eigen/QR>
#include <eigen3/Eigen/Dense>

namespace PyFI
{
Expand Down
6 changes: 3 additions & 3 deletions include/PyFI/eigen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
A = 1000*np.random.random((m,n))"""
a = timeit.timeit('np.linalg.pinv(A)', setup=init, number=1000)
b = timeit.timeit('eigen.pinv(A)', setup=init, number=1000)
print "eigen successfully inverted the {}x{} matrix {} times faster than numpy".format(m,n,a/b)
print("eigen successfully inverted the {}x{} matrix {} times faster than numpy".format(m,n,a/b))

p = 3
B = 1000*np.random.random((m,p))
Expand All @@ -55,7 +55,7 @@
B = 1000*np.random.random((m,p))"""
a = timeit.timeit('np.linalg.lstsq(A,B)', setup=init, number=1000)
b = timeit.timeit('eigen.solve(A,B)', setup=init, number=1000)
print "eigen successfully solved the equatioon AX=B {} times faster than numpy\n\twhere A was {}x{}, and B was {}x{}".format(a/b,m,n,m,p)
print("eigen successfully solved the equatioon AX=B {} times faster than numpy\n\twhere A was {}x{}, and B was {}x{}".format(a/b,m,n,m,p))


p = 2000
Expand All @@ -69,5 +69,5 @@
B = 1000*np.random.random((n,p))"""
a = timeit.timeit('np.dot(A,B)', setup=init, number=1000)
b = timeit.timeit('eigen.dot(A,B)', setup=init, number=1000)
print "eigen successfully multiplied A*B {} times faster than numpy\n\twhere A was {}x{}, and B was {}x{}".format(a/b,m,n,n,p)
print("eigen successfully multiplied A*B {} times faster than numpy\n\twhere A was {}x{}, and B was {}x{}".format(a/b,m,n,n,p))

0 comments on commit 98d8218

Please sign in to comment.