[Yt-svn] commit/yt: MatthewTurk: This should speed up some projection operations and reduce memory overhead

Bitbucket commits-noreply at bitbucket.org
Wed Sep 14 11:52:53 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/2ad3ef640582/
changeset:   2ad3ef640582
branch:      yt
user:        MatthewTurk
date:        2011-09-14 20:52:29
summary:     This should speed up some projection operations and reduce memory overhead
during the reduce state.
affected #:  1 file (92 bytes)

--- a/yt/data_objects/data_containers.py	Tue Sep 13 23:01:57 2011 -0400
+++ b/yt/data_objects/data_containers.py	Wed Sep 14 11:52:29 2011 -0700
@@ -1612,13 +1612,15 @@
             else:
                 ds = 0.0
             dxs.append(na.ones(nvals.shape[0], dtype='float64') * ds)
-        coord_data = na.concatenate(coord_data, axis=0).transpose()
-        field_data = na.concatenate(field_data, axis=0).transpose()
+        coord_data = na.concatenate(coord_data, axis=0)
+        coord_data.shape = (coord_data.shape[1], coord_data.shape[0])
+        field_data = na.concatenate(field_data, axis=0)
+        field_data.shape = (field_data.shape[1], field_data.shape[0])
         if self._weight is None:
             dls, convs = self._get_dls(self._grids[0], fields)
             field_data *= convs
-        weight_data = na.concatenate(weight_data, axis=0).transpose()
-        dxs = na.concatenate(dxs, axis=0).transpose()
+        weight_data = na.concatenate(weight_data, axis=0)
+        dxs = na.concatenate(dxs, axis=0)
         # We now convert to half-widths and center-points
         data = {}
         data['pdx'] = dxs

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list