Useless line in collections.py

Hi,

I don't think line 96 of collections.py is doing anything:

         if offsets is not None:
             offsets = np.asarray(offsets, np.float_)
             if len(offsets.shape) == 1:
                 offsets = offsets[np.newaxis,:] # Make it Nx2.
             if transOffset is not None:
                 Affine2D = transforms.Affine2D <----*********
                 self._offsets = offsets
                 self._transOffset = transOffset
             else:
                 self._uniform_offsets = offsets

         self._pickradius = pickradius
         self.update(kwargs)

This is in __init__ for Collection, which ends with the code I've pasted here. It doesn't appear that Affine2D is used and is probably left over cruft.

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Right you are. Fixed in SVN.

Cheers,
Mike

Ryan May wrote:

···

Hi,

I don't think line 96 of collections.py is doing anything:

         if offsets is not None:
             offsets = np.asarray(offsets, np.float_)
             if len(offsets.shape) == 1:
                 offsets = offsets[np.newaxis,:] # Make it Nx2.
             if transOffset is not None:
                 Affine2D = transforms.Affine2D <----*********
                 self._offsets = offsets
                 self._transOffset = transOffset
             else:
                 self._uniform_offsets = offsets

         self._pickradius = pickradius
         self.update(kwargs)

This is in __init__ for Collection, which ends with the code I've pasted here. It doesn't appear that Affine2D is used and is probably left over cruft.

Ryan

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA