title: Python error "TypeError: sort() takes at most 2 arguments (3 given)"
body: <p>I am receiving "TypeError: sort() takes at most 2 arguments (3 given)" upon running the following script taken from <a href="http://docs.enthought.com/mayavi/mayavi/mlab_case_studies.html" rel="nofollow noreferrer">this tutorial</a>:</p>
  
  <pre><code>import numpy as np
  from mayavi import mlab
  
  x, y, z = np.ogrid[-10:10:20j, -10:10:20j, -10:10:20j]
  s = np.sin(x*y*z)/(x*y*z)
  sf = mlab.pipeline.scalar_field(s)
  mlab.pipeline.volume(sf)
  </code></pre>
  
  <p>The python, numpy, and mayavi versions I'm using are  3.5.2 (Anaconda 4.1.1), 1.11.1, and 4.5.0, respectively. Mayavi was installed using the command:</p>
  
  <pre><code>conda install --channel https://conda.anaconda.org/menpo mayavi
  </code></pre>
  
  <p>I have tried some other APIs of mayavi, and they are working fine. Does anyone have an idea as to what might be wrong? Full traceback is below.</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-12-6743e5b203bd&gt; in &lt;module&gt;()
  ----&gt; 1 mlab.pipeline.volume(sf)
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\tools\pipe_base.py in the_function(*args, **kwargs)
       36 def make_function(factory_class):
       37     def the_function(*args, **kwargs):
  ---&gt; 38         factory = factory_class(*args, **kwargs)
       39         return factory._target
       40 
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\tools\pipe_base.py in __init__(self, parent, **kwargs)
      144             self._do_redraw = not scene.disable_render
      145             scene.disable_render = True
  --&gt; 146         if issubclass(self._target.__class__, Filter):
      147             self._engine.add_filter(self._target, obj=parent)
      148         else:
  
  C:\Anaconda3\lib\site-packages\traits\trait_types.py in create_default_value(self, *args, **kw)
     2799                 raise TraitError('Unable to locate class: ' + args[0])
     2800 
  -&gt; 2801         return klass( *args[1:], **kw )
     2802 
     2803     #: fixme: Do we still need this method using the new style?...
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\core\module.py in __init__(self, **traits)
       56 
       57         # Let the module setup its pipeline.
  ---&gt; 58         self.setup_pipeline()
       59 
       60     def __get_pure_state__(self):
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\modules\volume.py in setup_pipeline(self)
      305         vp = self._volume_property = tvtk.VolumeProperty()
      306 
  --&gt; 307         self._ctf = ctf = default_CTF(0, 255)
      308         self._otf = otf = default_OTF(0, 255)
      309         vp.set_color(ctf)
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\modules\volume.py in default_CTF(x1, x2)
      123                     val_range=(1.0, 1.0),
      124                     n=10,
  --&gt; 125                     mode='sqrt')
      126 
      127 
  
  C:\Anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\mayavi\modules\volume.py in make_CTF(x1, x2, hue_range, sat_range, val_range, n, mode)
      101             v = val_range[0] + dval*x
      102             r, g, b, a = [sqrt(c) for c in hsva_to_rgba(h, s, v, 1.0)]
  --&gt; 103             ctf.add_rgb_point(mins+x*ds, r, g, b)
      104     elif mode == 'linear':
      105         for i in range(n+1):
  
  c:\anaconda3\lib\site-packages\mayavi-4.5.0-py3.5-win-amd64.egg\tvtk\util\ctf.py in add_rgb_point(self, *args)
      208         ret = super(ColorTransferFunction, self).add_rgb_point(*args)
      209         self.nodes.append(args[0])
  --&gt; 210         self.nodes.sort()
      211         return ret
      212 
  
  C:\Anaconda3\lib\site-packages\traits\trait_handlers.py in sort(self, cmp, key, reverse)
     2565     def sort ( self, cmp = None, key = None, reverse = False ):
     2566         removed = self[:]
  -&gt; 2567         list.sort( self, cmp = cmp, key = key, reverse = reverse )
     2568 
     2569         if (getattr(self, 'name_items', None) is not None and
  
  TypeError: sort() takes at most 2 arguments (3 given)
  *********************************************************************************
  </code></pre>