Closed kwgoodman closed 12 years ago
Current larry.astype:
y = self.copy() y.x = y.x.astype(dtype) return y
Proposed:
label = self.copylabel() x = self.x.astype(dtype) return larry(x, label, validate=False)
Current:
I[1] lar = la.rand(1000, 1000) I[2] lar.dtype O[2] dtype('float64') I[3] timeit lar.astype(np.float32) 1000 loops, best of 3: 1.57 ms per loop
I[1] lar = la.rand(1000, 1000) I[2] timeit lar.astype(np.float32) 1000 loops, best of 3: 766 us per loop
Current larry.astype:
Proposed:
Current:
Proposed: