Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Use pandas if available #422
It tries to load the pandas module and uses it if it can, otherwise, it
Note that the nest.is_iterable test returns True for a string, since a
Tested this out with the gdf file generated from
Fixes #400 to begin with.
It tries to load the pandas module and uses it if it can, otherwise, it falls back to numpy. Note that the nest.is_iterable test returns True for a string, since a string is iterable and the function then tries to iterate over each character in the string! I've, therefore, changed the test. Tested this out with the gdf file generated from `examples/nest/tsodyks_shortterm_bursts.sli` using the `examples/nest/plot_tsodyks_shortterm_bursts.py` plotter script and it works both with and without pandas. Fixes #400 to begin with.
Maybe the test for ["string"...] should be inverted? We should check for isinstance(str) for the single filename case rather than checking that we received a list or a tuple.
In fact, the code can be simplified by just making
but maybe there's a python2.7 issue with str vs byte vs unicode types for the test?