From: Sasha <nd...@ma...> - 2006-07-03 18:07:11
|
On 7/3/06, Alan G Isaac <ai...@am...> wrote: > .... > Consistency! That is exactly the issue, > especially for those who wish to teach with numpy. > > I do not want to tell my students to write > ones([5,5]) > but > rand(5,5) > and although relatively new to Python > I actually like the practice of providing > dimensions in a list or tuple. > Consistency is already lost because 1d case allows both ones(5) and ones([5]) (and even ones((5,)) if anyone can tolerate that abomination). I don't think those who argue for sequence only are willing to require ones([5]). Remember, "A Foolish Consistency is the Hobgoblin of Little Minds" (Ralph Waldo Emerson (1803=961882), adopted without attribution as a section heading in PEP 8 <http://www.python.org/dev/peps/pep-0008>). I think the current situation strikes the right balance between convenience and consistency. |