On Thu, Oct 27, 2011 at 10:52:01AM +0200, pellegrini wrote: > s = [0,1,2,3,4] > self.pts.module_manager.scalar_lut_manager.lut.table[s,:] = [255,0,0]
> TypeError: Only integers are valid keys. > The only way I found to solve this is to do: > self.pts.module_manager.scalar_lut_manager.lut.table.to_array()[s,:] = > [255,0,0] > is this the only way to do ? Yes: numpy arrays can be indexed by arrays of integers, but that's a behavior that is specific to numpy arrays, and the lut table is not a numpy array. You have to either do a loop on the indices, or convert it to a numpy array, and later reassign it. HTH, Gaƫl ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users