From: Andrew M. <And...@AB...> - 2006-10-17 17:28:21
|
I would like to use the built-in array_repr in numpy, because I need a fast repr that does not contain new line characters. I see no way of doing this without editing the code in numeric.py, and I hate to edit other people's libraries. from numpy import array causes numeric.py to be executed, which includes a call to multiarray.set_string_function(array_repr, 1) If I want to "undo" this, there is no way of doing it. I would like to unset the repr with: numpy.set_string_function(None, 1) but this raises a TypeError because None is not callable. This behavior was the same in Numeric, and in that case I edited the code in Numeric.py but it would be nice if I didn't have to do that. Should I submit a patch for this? Andrew MacKeith |