Bill Baxter wrote:
>
>     And mark my words, if we make rand() polymorphic,
>
>     we will get just as many newbies coming to the list asking why
>     ones(3, 4)
>
>     doesn't work.
>
>
> I think you're probably right there, at least for Matlab converts.  
> Matlab allows either way of calling for all of rand, ones, zeros, eye, 
> and in general tries to make *every* function accept *any* possible 
> combination of arguments that might make sense.  So having rand() 
> accept both, but not the others, will undoubtedly be unexpected to 
> Matlab users.  And the argument against funky overloading will be 
> weaker since they'll be able to say "well rand() does it? why can't 
> ones()?"
>
> Fortunately it's pretty easy to define one's own custom versions of 
> these little helper functions to make them just the way you like 
> them.   Or for rand(), just "from numpy.random import uniform_sample 
> as rand" if that's the version you like.

Because of this.  I've removed the global_namespace functions (fft, 
ifft, rand, and randn) from numpy.  They are *no longer* in the 
top-level name-space.   If you want them, setup a startup-file 
appropriately.


-Travis



-------------------------------------------------------------------------
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