Issue #839: AMRKDTree.count_cells() fails with a YTUnitOperationError (yt_analysis/yt)
New issue 839: AMRKDTree.count_cells() fails with a YTUnitOperationError https://bitbucket.org/yt_analysis/yt/issue/839/amrkdtreecount_cells-fails-wi... Stuart Mumford: running `amrkdtree_downsampling.py` produces the following: ``` #!python Traceback (most recent call last): File "/home/stuart/BitBucket/yt/doc/source/cookbook/amrkdtree_downsampling.py", line 19, in <module> print kd.count_cells() File "/home/stuart/BitBucket/yt/yt/utilities/amr_kdtree/amr_kdtree.py", line 537, in count_cells return self.tree.sum_cells() File "/home/stuart/BitBucket/yt/yt/utilities/amr_kdtree/amr_kdtree.py", line 124, in sum_cells li = np.rint((nle-gle)/dds).astype('int32') File "/home/stuart/BitBucket/yt/yt/units/yt_array.py", line 496, in __rsub__ lo = sanitize_units_add(self, left_object, "subtraction") File "/home/stuart/BitBucket/yt/yt/units/yt_array.py", line 141, in sanitize_units_add dimensionless) yt.utilities.exceptions.YTUnitOperationError: The subtraction operator for YTArrays with units (code_length) and (1) is not well defined. ```
participants (1)
-
Stuart Mumford