[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon May 22 13:25:48 PDT 2017
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/616d641ceded/
Changeset: 616d641ceded
User: xarthisius
Date: 2017-05-22 16:19:33+00:00
Summary: [docs] fixes for numpy 1.11
Affected #: 2 files
diff -r 9221d78d30c1b55451e3a81da1900fb1c059f73c -r 616d641cedede1c3458ca733db8c39cd8997e7f8 doc/source/analyzing/analysis_modules/PPVCube.ipynb
--- a/doc/source/analyzing/analysis_modules/PPVCube.ipynb
+++ b/doc/source/analyzing/analysis_modules/PPVCube.ipynb
@@ -93,14 +93,14 @@
"outputs": [],
"source": [
"dens = np.zeros((nx,ny,nz))\n",
- "dens[:,:,nz/2-3:nz/2+3] = (r**alpha).reshape(nx,ny,1) # the density profile of the disk\n",
+ "dens[:,:,nz//2-3:nz//2+3] = (r**alpha).reshape(nx,ny,1) # the density profile of the disk\n",
"temp = np.zeros((nx,ny,nz))\n",
- "temp[:,:,nz/2-3:nz/2+3] = 1.0e5 # Isothermal\n",
+ "temp[:,:,nz//2-3:nz//2+3] = 1.0e5 # Isothermal\n",
"vel_theta = 100.*r/(1.+(r/r_0)**beta) # the azimuthal velocity profile of the disk\n",
"velx = np.zeros((nx,ny,nz))\n",
"vely = np.zeros((nx,ny,nz))\n",
- "velx[:,:,nz/2-3:nz/2+3] = (-vel_theta*np.sin(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
- "vely[:,:,nz/2-3:nz/2+3] = (vel_theta*np.cos(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
+ "velx[:,:,nz//2-3:nz//2+3] = (-vel_theta*np.sin(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
+ "vely[:,:,nz//2-3:nz//2+3] = (vel_theta*np.cos(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
"dens[r > R] = 0.0\n",
"temp[r > R] = 0.0\n",
"velx[r > R] = 0.0\n",
diff -r 9221d78d30c1b55451e3a81da1900fb1c059f73c -r 616d641cedede1c3458ca733db8c39cd8997e7f8 doc/source/examining/Loading_Generic_Particle_Data.ipynb
--- a/doc/source/examining/Loading_Generic_Particle_Data.ipynb
+++ b/doc/source/examining/Loading_Generic_Particle_Data.ipynb
@@ -19,7 +19,7 @@
"source": [
"import numpy as np\n",
"\n",
- "n_particles = 5e6\n",
+ "n_particles = int(5e6)\n",
"\n",
"ppx, ppy, ppz = 1e6*np.random.normal(size=[3, n_particles])\n",
"\n",
https://bitbucket.org/yt_analysis/yt/commits/b9bddf759296/
Changeset: b9bddf759296
User: xarthisius
Date: 2017-05-22 17:52:23+00:00
Summary: [art] use integer division to calculate root_ncells
Affected #: 1 file
diff -r 616d641cedede1c3458ca733db8c39cd8997e7f8 -r b9bddf75929618c424d46b692a876761a6ddc9a9 yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -277,7 +277,7 @@
# domain dimensions is the number of root *cells*
self.domain_dimensions = np.ones(3, dtype='int64')*est
self.root_grid_mask_offset = f.tell()
- self.root_nocts = self.domain_dimensions.prod()/8
+ self.root_nocts = self.domain_dimensions.prod() // 8
self.root_ncells = self.root_nocts*8
mylog.debug("Estimating %i cells on a root grid side," +
"%i root octs", est, self.root_nocts)
https://bitbucket.org/yt_analysis/yt/commits/862fd3cab171/
Changeset: 862fd3cab171
User: xarthisius
Date: 2017-05-22 18:09:29+00:00
Summary: Do not use scientific notation for integers
Affected #: 1 file
diff -r b9bddf75929618c424d46b692a876761a6ddc9a9 -r 862fd3cab17164999d937a239ceedc4b9ede940f doc/source/examining/Loading_Generic_Particle_Data.ipynb
--- a/doc/source/examining/Loading_Generic_Particle_Data.ipynb
+++ b/doc/source/examining/Loading_Generic_Particle_Data.ipynb
@@ -19,7 +19,7 @@
"source": [
"import numpy as np\n",
"\n",
- "n_particles = int(5e6)\n",
+ "n_particles = 5000000\n",
"\n",
"ppx, ppy, ppz = 1e6*np.random.normal(size=[3, n_particles])\n",
"\n",
https://bitbucket.org/yt_analysis/yt/commits/6c6f7ba9d577/
Changeset: 6c6f7ba9d577
User: xarthisius
Date: 2017-05-22 20:25:31+00:00
Summary: Merge pull request #1418 from Xarthisius/doc_numpy
[bugfix] integer division
Affected #: 3 files
diff -r 9221d78d30c1b55451e3a81da1900fb1c059f73c -r 6c6f7ba9d577da685efc00f23067d181ded7f01c doc/source/analyzing/analysis_modules/PPVCube.ipynb
--- a/doc/source/analyzing/analysis_modules/PPVCube.ipynb
+++ b/doc/source/analyzing/analysis_modules/PPVCube.ipynb
@@ -93,14 +93,14 @@
"outputs": [],
"source": [
"dens = np.zeros((nx,ny,nz))\n",
- "dens[:,:,nz/2-3:nz/2+3] = (r**alpha).reshape(nx,ny,1) # the density profile of the disk\n",
+ "dens[:,:,nz//2-3:nz//2+3] = (r**alpha).reshape(nx,ny,1) # the density profile of the disk\n",
"temp = np.zeros((nx,ny,nz))\n",
- "temp[:,:,nz/2-3:nz/2+3] = 1.0e5 # Isothermal\n",
+ "temp[:,:,nz//2-3:nz//2+3] = 1.0e5 # Isothermal\n",
"vel_theta = 100.*r/(1.+(r/r_0)**beta) # the azimuthal velocity profile of the disk\n",
"velx = np.zeros((nx,ny,nz))\n",
"vely = np.zeros((nx,ny,nz))\n",
- "velx[:,:,nz/2-3:nz/2+3] = (-vel_theta*np.sin(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
- "vely[:,:,nz/2-3:nz/2+3] = (vel_theta*np.cos(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
+ "velx[:,:,nz//2-3:nz//2+3] = (-vel_theta*np.sin(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
+ "vely[:,:,nz//2-3:nz//2+3] = (vel_theta*np.cos(theta)).reshape(nx,ny,1) # convert polar to cartesian\n",
"dens[r > R] = 0.0\n",
"temp[r > R] = 0.0\n",
"velx[r > R] = 0.0\n",
diff -r 9221d78d30c1b55451e3a81da1900fb1c059f73c -r 6c6f7ba9d577da685efc00f23067d181ded7f01c doc/source/examining/Loading_Generic_Particle_Data.ipynb
--- a/doc/source/examining/Loading_Generic_Particle_Data.ipynb
+++ b/doc/source/examining/Loading_Generic_Particle_Data.ipynb
@@ -19,7 +19,7 @@
"source": [
"import numpy as np\n",
"\n",
- "n_particles = 5e6\n",
+ "n_particles = 5000000\n",
"\n",
"ppx, ppy, ppz = 1e6*np.random.normal(size=[3, n_particles])\n",
"\n",
diff -r 9221d78d30c1b55451e3a81da1900fb1c059f73c -r 6c6f7ba9d577da685efc00f23067d181ded7f01c yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -277,7 +277,7 @@
# domain dimensions is the number of root *cells*
self.domain_dimensions = np.ones(3, dtype='int64')*est
self.root_grid_mask_offset = f.tell()
- self.root_nocts = self.domain_dimensions.prod()/8
+ self.root_nocts = self.domain_dimensions.prod() // 8
self.root_ncells = self.root_nocts*8
mylog.debug("Estimating %i cells on a root grid side," +
"%i root octs", est, self.root_nocts)
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