Permalink
Browse files

ENH larry.astype() is faster.

Closes #52.
  • Loading branch information...
1 parent f3c012d commit cfeb7afb43e0b9c6f9fbb2a2a7223fdd6231c73a @kwgoodman committed Mar 8, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −0 RELEASE.rst
  2. +3 −3 la/deflarry.py
View
@@ -27,6 +27,7 @@ la 0.6
- Upgrade numpydoc from 0.3.1 to 0.4 to support Sphinx 1.0.1
- la.farray.ranking() and larry ranking method support `axis=None`
- Generate C code with Cython 0.15.1 instead of Cython 0.11
+- larry.astype() is faster
**Breakage from la 0.5**
View
@@ -4015,9 +4015,9 @@ def astype(self, dtype):
array([1, 2, 2])
"""
- y = self.copy()
- y.x = y.x.astype(dtype)
- return y
+ label = self.copylabel()
+ x = self.x.astype(dtype)
+ return larry(x, label, validate=False)
@property
def T(self):

0 comments on commit cfeb7af

Please sign in to comment.