Numpy Array printing algorithms
Hi All, This is more suited for a numpy list but thought I'd try the home crowd first. Does anyone know how numpy decides to print arrays? It is a pain getting doctests to pass without knowing the system. Example: In [15]: lifio.parse_series_name(name2)[1][:5] Out[15]: array([ 63. , 63.5, 64. , 64.5, 65. ]) In [16]: lifio.parse_series_name(name2, 1)[1][:5] Out[16]: array([ 63., 64., 65., 66., 67.]) Note: It goes 63.<space>,<space-space>63.5,<space-space>64.<space> etc. Note also the space after the opening brace but not the closing brace. Basically, you can't go by PEP8, so it's a pain predicting what the actual printout is going to be. I get the space after the . so that the .5's will align, but what about the leading spaces? Juan.
participants (1)
-
Juan Nunez-Iglesias