identity seems to be a "crippled" version of eye without any value
added, apart from backwards-compatibility;

So from a user point of view, which one does numpy recommend?

And from a developer point of view (which doesn't really apply to me, of
course), should identity maybe become an alias for eye(n, dtype=...)?

Or is there a subtle (or not so subtle...) difference I am missing?

I am aware this question is not really that important since everything
works, but when I read that there will be a 1.0beta soon I thought maybe
this is the right time to ask those kind of questions.

Here are the help-strings:

eye(N, M=None, k=0, dtype=<type 'int32scalar'>)
    eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
    and everything else is zeros.

identity(n, dtype=<type 'int32scalar'>)
    identity(n) returns the identity 2-d array of shape n x n.

Cheers,
Sven

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to