Unverified Commit 42442af6 authored by Gao, Xiang's avatar Gao, Xiang Committed by GitHub
Browse files

Specify dtype for species (#502)

* Specify dtype for species

For some reason, sometimes species are constructed as int tensors instead of long tensors, this is wrong and should be fixed

* Update __init__.py
parent d98926ce
......@@ -146,7 +146,7 @@ class Transformations:
def reenterable_iterable_factory():
for d in reenterable_iterable:
d['species'] = numpy.array([idx[s] for s in d['species']])
d['species'] = numpy.array([idx[s] for s in d['species']], dtype='i8')
yield d
try:
return IterableAdapterWithLength(reenterable_iterable_factory, len(reenterable_iterable))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment