[Numpy-discussion] Re: API inconsistencies

Albert Strasheim fullung at gmail.com
Thu May 4 15:36:05 EDT 2006


Robert Kern wrote:

> Albert Strasheim wrote:
> 
> > What's the current thinking NumPy backwards compatibility with Numeric
> and
> > ndarray? Is NumPy 1.0 aiming to be compatible, or will some porting
> effort
> > be considered to be the default setting?
> 
> We are trying to be as compatible with Numeric as possible by using the
> convertcode.py script. We hope that that will get people 99% of the way
> there.
> 
> numarray modules will take some more effort to convert.

This is a good way of dealing with this issue.

> > In case the answer is the latter, and rand is supposed to be convenient
> way
> > of calling numpy.random.random(someshape), as you said on the scipy-user
> > list, shouldn't their arguments be the same? Having to choose between
> the
> > two inconveniences of typing long names or remembering more than one
> > convention for calling functions, I'd prefer to choose neither. But
> that's
> > just me. ;-)
> 
> Most of the convenience is the calling convention, not the shorter name.

In my opinion, having one calling convention for functions in the base
namespace is much more convenient than the convenience provided by these
special cases.

Are there many convenience functions, or are rand and randn the only two? A
quick search didn't turn up any others, but I might have missed some.

Regards,

Albert





More information about the NumPy-Discussion mailing list