# [Matrix-SIG] fromfunction broke in LLNL10??

**Les Schaffer
**
godzilla@netmeg.net (Les Schaffer)

*Wed, 24 Mar 1999 12:49:50 -0500 (EST)*

>* Hm. I suspect it was a change to "indices". If you don't want to
*>* wait for me to get a chance to look at it, you might just get the
*>* indices from version 9 and paste it in and see if that fixes it. The
*>* change was a simplification that was supposed to be possible now; I
*>* got it from a user.
*
yup... i assume this wont break something else.
Les
-------------- start patch -----------------
*** Numeric.py~ Thu Mar 18 13:52:23 1999
--- Numeric.py Wed Mar 24 12:46:40 1999
***************
*** 146,152 ****
return reshape(a, new_shape)
def indices(dimensions, typecode=None):
! tmp = ones(dimensions, typecode)
lst = []
for i in range(len(dimensions)):
lst.append( add.accumulate(tmp, i, )-1 )
--- 146,155 ----
return reshape(a, new_shape)
def indices(dimensions, typecode=None):
! if typecode == None:
! tmp = ones(dimensions)
! else:
! tmp = ones(dimensions, typecode)
lst = []
for i in range(len(dimensions)):
lst.append( add.accumulate(tmp, i, )-1 )
---------------- end patch --------------
--
____ Les Schaffer ___| --->> Engineering R&D <<---
Theoretical & Applied Mechanics | Designspring, Inc.
Center for Radiophysics & Space Research | http://www.designspring.com/
Cornell Univ. schaffer@tam.cornell.edu | les@designspring.com