On Sun, 7 Nov 2010, Ralf Gommers wrote:
That will require renaming those files in the source tree from *.txt
to *.rst, otherwise there's no way to have github render them
properly. Unless I missed something. Would that be fine?
I think a *.rst.txt extension would also be recognized by github.
I've haven't found any clean way. So I'll use numpy.allclose in my doctests.
It will be harder to read, less interactive-session-like, but it might show the
reader how compare floats properly.
On Fri, Oct 15, 2010 at 2:05 PM, Fabrice Silva si...@lma.cnrs-mrs.fr wrote:
Maybe you should not rely
Hello all,
I use doctest for examples and tests in a program which relies heavily on numpy.
As floating point calculations differs slightly across computers
(32/64 bits), I have troubles
writing portable doctests.
The doctest documentation [1] advises to use numbers in the form
int/2**n. This
Hello,
I'm trying to write a small library of differential geometry, and I
have some trouble subclassing ndarray.
I'd like an HomogeneousMatrix class that subclasse ndarray and
overloads some methods, such as inv().
Here is my first try, the inv() function and the inv_v1() method work
as
2008/12/3 Kevin Jacobs [EMAIL PROTECTED] [EMAIL PROTECTED]:
On Wed, Dec 3, 2008 at 9:19 AM, Sébastien Barthélemy [EMAIL PROTECTED]
wrote:
def inv_v1(self):
self[0:4,0:4] = htr.inv(self)
def inv_v2(self):
data = htr.inv(self)
self = HomogeneousMatrix(data)
def
2008/12/3 Fabrice Silva [EMAIL PROTECTED]:
Le mercredi 03 décembre 2008, Sébastien Barthélemy a écrit :
Hello,
Hi Sebastien!
Hello Fabrice
There is something I missed: what is htr? I guess htr.inv is the inv
function defined before the class.
yes, I cut-n-pasted the function definition
def rotx(theta):
SE(3) matrices corresponding to a rotation around x-axis. Theta is
a 1-d array
costheta = np.cos(theta)
sintheta = np.sin(theta)
H = np.zeros((theta.size,4,4))
H[:,0,0] = 1
H[:,3,3] = 1
H[:,1,1] = costheta
H[:,2,2] = costheta
with a
HomogenousMatrix class ? (one could then redefine inv() for instance)
- Is my implementation of rotx efficient ?
Thank you for any help, and please feel free to send me back reading
anything I missed.
regards
--
Sébastien Barthélemy
___
Numpy-discussion mailing