|
From: Travis O. <oli...@ee...> - 2006-02-17 23:50:08
|
Sasha wrote: >Maybe we can change ufunc logic so that when the output argument is >supplied it is returned without scalar conversion. > > That seems sensible. Any objections? It is PyArray_Return that changes things from 0-d array's to scalars. It's all that function has every really done.... Notice that this behavior was always in Numeric... a = Numeric.array(5) a += 10 type(a) <type 'int'> >>> a = Numeric.array(5) >>> type(a) == type(a+a) False But... >>> a = Numeric.array(5,'f') >>> type(a) == type(a+a) True So, we've been dealing with these issues (poorly) for a long time.... -Travis |