Join GitHub today
ENH added arange(), zeros(), ones() #46
I noticed that in numpy np.ones and np.zeros just call np.empty with fill values of 1 and 0, respectively.
Maybe we should go that way too? So if we made a la.empty then la.ones and la.zeros could use that and just fill the arrays. That would be cleaner (less duplicate code) plus it would give us a la.empty function.
The _args and *_kwargs cannot be dropped if we want the function to behave the way we had initially decided. But we could make it follow the same rules that the others follow, in which case they can be.
The issue is that without _args, you can't get something like la.lrange(5,4,3) to work. It would have to be la.lrange((5,4,3)). That's why all these functions had *args and *_kwargs in the first place. But I don't see a strong reason to prefer the current call. It is more convenient, but if the docstring is confusing does that matter?