On 7/3/06, Alan G Isaac <aisaac@american.edu> wrote:
Your primary argument against changing the API, as far as
I can see, is that allowing *both* the extant behavior and
the numpy consistent behavior will result in confusing code.
http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/3150643
Is this a knock-down argument? I think not.
In particular the argument was that it would make for code that's confusing for users to read.
I.e. in some places the users see 'rand(2,2,3)' and in other places 'rand((2,2,3))'. I really don't see anything confusing about that. There's only one interpretation of either of those that makes sense. If there's any confusion issue I think it's more likely to come from looking at the source code of rand() itself. But even that is pretty minor given a few minutes to write a some comments about what's going on.
Personally I think allowing the separate argument variations on these few methods would be a good thing. It makes ones() and zeros() more like Matlab's for one. But also it just looks cleaner to say ones(2,3,5) than it does to say ones((2,3,5)). I understand the general objections to it.