~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to chaco/function_image_data.py

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    @on_trait_change('data_range.updated')
34
34
    def recalculate(self):
35
35
        if self.func is not None and self.data_range is not None:
36
 
            newarray = self.func(self.data_range.x_range.low, self.data_range.x_range.high,
37
 
                self.data_range.y_range.low, self.data_range.y_range.high)
 
36
            newarray = self.func(
 
37
                self.data_range.x_range.low,
 
38
                self.data_range.x_range.high,
 
39
                self.data_range.y_range.low,
 
40
                self.data_range.y_range.high
 
41
            )
38
42
            ImageData.set_data(self, newarray)
39
43
        else:
40
44
            self._data = array([], dtype=float)
41
45
 
42
46
    def set_data(self, *args, **kw):
43
 
        raise RuntimeError("Cannot set numerical data on a FunctionDataSource")
 
47
        raise RuntimeError("Cannot set numerical data on a FunctionImageData")
44
48
 
45
49
    def set_mask(self, mask):
46
50
        # This would be REALLY FREAKING SLICK, but it's currently unimplemented