[yt-users] sample_colormap
Mateusz Ruszkowski
mateuszr at umich.edu
Tue Dec 10 15:17:10 PST 2013
Hi,
I am trying to do a very simple test of the sample_colormap function:
from yt.mods import *
tf = ColorTransferFunction( (-30.0, -25.0) )
tf.sample_colormap(-27.0, 0.01, 'algae')
and I am getting this error message triggered by the last line above:
Traceback (most recent call last):
File "layer_test.py", line 9, in <module>
tf.sample_colormap(-27.0, 0.01, 'algae')
File
"/home/mateuszr/yt/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/transfer_functions.py",
line 632, in sample_colormap
self.add_gaussian(v, w, [r, g, b, alpha])
File
"/home/mateuszr/yt/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/transfer_functions.py",
line 404, in add_gaussian
tf.add_gaussian(location, width, v)
File
"/home/mateuszr/yt/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/transfer_functions.py",
line 81, in add_gaussian
vals = height * np.exp(-(self.x - location)**2.0/width)
TypeError: only integer arrays with one element can be converted to an index
Am I doing something very silly here or is it a bug?
Thanks,
Mateusz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20131210/e1617a71/attachment.htm>
More information about the yt-users
mailing list