Closed gabor1 closed 4 years ago
in fact this is enough
gc121mac1:~ gabor$ docker exec quip abcd summary -q volker -p energy_per_atom --all
Traceback (most recent call last):
File "/usr/local/bin/abcd", line 11, in <module>
load_entry_point('abcd==0.4', 'console_scripts', 'abcd')()
File "/usr/local/lib/python3.5/dist-packages/abcd-0.4-py3.5.egg/abcd/frontends/shell/__init__.py", line 17, in cli
File "/usr/local/lib/python3.5/dist-packages/abcd-0.4-py3.5.egg/abcd/frontends/shell/__init__.py", line 108, in __call__
File "/usr/local/lib/python3.5/dist-packages/abcd-0.4-py3.5.egg/abcd/frontends/shell/__init__.py", line 324, in summary
File "/usr/local/lib/python3.5/dist-packages/abcd-0.4-py3.5.egg/abcd/backends/atoms_mongoengine.py", line 575, in hist
File "/usr/local/lib/python3.5/dist-packages/abcd-0.4-py3.5.egg/abcd/backends/atoms_mongoengine.py", line 596, in _hist_float
File "/usr/lib/python3/dist-packages/numpy/lib/function_base.py", line 730, in histogram
norm = bins / (mx - mn)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
gc121mac1:~ gabor$
Yes, it is a special case with floats. The '--all' option doesn't make to much sense in the case of float and integer arrays. Practically all the floats are different. There is two possible way to resolve this issue:
I agree that the -- all should do nothing when you are binning stuff and printing all the bins, which is what happens with the floats. but it shouldn't return an error either.
if I ask for a float and a string and --all, then I expect the float to be binned (And this is unaffected by the --all) but the string histogram should be printed in full