[yt-dev] Issue #845: Subclass of YTArray throwing errors (yt_analysis/yt)

Matthew Turk issues-reply at bitbucket.org
Thu May 22 13:24:51 PDT 2014


New issue 845: Subclass of YTArray throwing errors
https://bitbucket.org/yt_analysis/yt/issue/845/subclass-of-ytarray-throwing-errors

Matthew Turk:

This script works for float64, but fails for float32.

```
#!python
from yt.units import cm
from yt.data_objects.octree_subset import YTPositionArray
import numpy as np

a = np.random.random(100).astype("float32") * cm
a *= np.finfo(a.dtype).eps

b = YTPositionArray(np.random.random((100, 3)).astype("float32"), input_units="cm")
print type(b)
b *= np.finfo(b.dtype).eps
```

It's also at paste 4674.

Responsible: ngoldbaum



More information about the yt-dev mailing list