[yt-svn] commit/yt: jzuhone: Merged in ngoldbaum/yt (pull request #2478)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jan 5 10:50:36 PST 2017


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/6dc7c9a92d34/
Changeset:   6dc7c9a92d34
Branch:      yt
User:        jzuhone
Date:        2017-01-05 18:50:08+00:00
Summary:     Merged in ngoldbaum/yt (pull request #2478)

Explicitly use integer division in absorption spectrum and ramses IO
Affected #:  2 files

diff -r 045a34d130b36022990a2c70eb8caede8db5932a -r 6dc7c9a92d34f3e3319e37ebc1448899742f247a yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
--- a/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
+++ b/yt/analysis_modules/absorption_spectrum/absorption_spectrum.py
@@ -495,8 +495,8 @@
                 window_width_in_bins = 2
 
                 while True:
-                    left_index = (center_index[i] - window_width_in_bins/2)
-                    right_index = (center_index[i] + window_width_in_bins/2)
+                    left_index = (center_index[i] - window_width_in_bins//2)
+                    right_index = (center_index[i] + window_width_in_bins//2)
                     n_vbins = (right_index - left_index) * n_vbins_per_bin[i]
 
                     # the array of virtual bins in lambda space

diff -r 045a34d130b36022990a2c70eb8caede8db5932a -r 6dc7c9a92d34f3e3319e37ebc1448899742f247a yt/frontends/ramses/fields.py
--- a/yt/frontends/ramses/fields.py
+++ b/yt/frontends/ramses/fields.py
@@ -121,7 +121,7 @@
                 if var.size == n1*n2:
                     tvals[tname] = var.reshape((n1, n2), order='F')
                 else:
-                    var = var.reshape((n1, n2, var.size / (n1*n2)), order='F')
+                    var = var.reshape((n1, n2, var.size // (n1*n2)), order='F')
                     for i in range(var.shape[-1]):
                         tvals[_cool_species[i]] = var[:,:,i]

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