Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r68123:9c0fabe8214b Date: 2013-11-14 16:09 -0500 http://bitbucket.org/pypy/pypy/changeset/9c0fabe8214b/
Log: simplify by using newbyteorder here diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py --- a/pypy/module/micronumpy/interp_numarray.py +++ b/pypy/module/micronumpy/interp_numarray.py @@ -519,13 +519,7 @@ # by converting nonnative byte order. if self.is_scalar(): return space.wrap(0) - if not self.get_dtype().is_flexible_type(): - s = self.get_dtype().name - if not self.get_dtype().is_native(): - s = s[1:] - dtype = interp_dtype.get_dtype_cache(space).dtypes_by_name[s] - else: - dtype = self.get_dtype() + dtype = self.get_dtype().descr_newbyteorder(space, NPY_NATIVE) contig = self.implementation.astype(space, dtype) return contig.argsort(space, w_axis) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit