[yt-dev] Issue #748: ColorTransferFunction.sample_colormap has erroneous docstring (yt_analysis/yt)
Kacper Kowalik
issues-reply at bitbucket.org
Wed Dec 11 00:35:26 PST 2013
New issue 748: ColorTransferFunction.sample_colormap has erroneous docstring
https://bitbucket.org/yt_analysis/yt/issue/748/colortransferfunctionsample_colormap-has
Kacper Kowalik:
As reported on [yt-users ml](http://lists.spacepope.org/pipermail/yt-users- spacepope.org/2013-December/004535.html) by Mateusz Ruszkowski, current docstring for `ColorTransferFunction.sample_colormap`:
````
#!python
>>> tf = ColorTransferFunction( (-10.0, -5.0) )
>>> tf.sample_colormap(-7.0, 0.01, 'algae')
````
yields:
````
#!bash
Traceback (most recent call last):
File "layer_test.py", line 9, in <module>
tf.sample_colormap(-27.0, 0.01, 'algae')
File "yt/visualization/volume_rendering/transfer_functions.py", line 632, in sample_colormap
self.add_gaussian(v, w, [r, g, b, alpha])
File "yt/visualization/volume_rendering/transfer_functions.py", line 404, in add_gaussian
tf.add_gaussian(location, width, v)
File "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
````
Responsible: xarthisius
More information about the yt-dev
mailing list