![](https://secure.gravatar.com/avatar/854c8d960d3b6d2c5b71c5d55f83e179.jpg?s=120&d=mm&r=g)
Feb. 23, 2005
3:18 a.m.
Looking at the code I wrote that must deal with special scalar vs array cases, I noticed that an important feature that the rank-0/scalar should have is a correct indexing behaviour with: a[..., NewAxis] or a[NewAxis] or a[NewAxis, ...] By the way, isn't it easier to find a solution to this problem by looking at specific pieces of code that currently needs an ugly case for scalar ? Moreover, should this rank-0 array behaviour of scalar be extended to other "scalar" objects ? Should we be able to use: p = (3,4) a = p[NewAxis] a.shape = (1,) a.typecode() ==> 'O' ?
7298
Age (days ago)
7298
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sebastien.deMentendeHorne@electrabel.com