[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Oct 16 15:26:34 PDT 2014
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/4b474886fcd8/
Changeset: 4b474886fcd8
Branch: yt
User: srichers
Date: 2014-10-16 17:53:24+00:00
Summary: fixed commented example in load_amr_grids
Affected #: 1 file
diff -r 9d022af9c4de627a45b1250f8c5427b9d8562989 -r 4b474886fcd8c7fab9ec0abb226a9299efce55a2 yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -771,7 +771,7 @@
... g["density"] = np.random.random(g["dimensions"]) * 2**g["level"]
...
>>> units = dict(density='g/cm**3')
- >>> ds = load_amr_grids(grid_data, [8, 8, 8], field_units=units,
+ >>> ds = load_amr_grids(grid_data, [32, 32, 32], field_units=units,
... length_unit=1.0)
"""
https://bitbucket.org/yt_analysis/yt/commits/9a435b7b2081/
Changeset: 9a435b7b2081
Branch: yt
User: srichers
Date: 2014-10-16 17:54:20+00:00
Summary: merge
Affected #: 3 files
diff -r 4b474886fcd8c7fab9ec0abb226a9299efce55a2 -r 9a435b7b2081f593c619afc542d361752063776f setup.py
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,12 @@
import subprocess
import shutil
import glob
+
+if sys.version_info < (2, 7):
+ print("yt currently requires Python version 2.7")
+ print("certain features may fail unexpectedly and silently with older versions.")
+ sys.exit(1)
+
import setuptools
from distutils.version import StrictVersion
if StrictVersion(setuptools.__version__) < StrictVersion('0.7.0'):
diff -r 4b474886fcd8c7fab9ec0abb226a9299efce55a2 -r 9a435b7b2081f593c619afc542d361752063776f yt/frontends/fits/data_structures.py
--- a/yt/frontends/fits/data_structures.py
+++ b/yt/frontends/fits/data_structures.py
@@ -157,6 +157,8 @@
naxis4 = 1
for i, fits_file in enumerate(self.dataset._handle._fits_files):
for j, hdu in enumerate(fits_file):
+ if isinstance(hdu, _astropy.pyfits.BinTableHDU):
+ continue
if self._ensure_same_dims(hdu):
units = self._determine_image_units(hdu.header, known_units)
try:
diff -r 4b474886fcd8c7fab9ec0abb226a9299efce55a2 -r 9a435b7b2081f593c619afc542d361752063776f yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -473,7 +473,8 @@
field_units[k] = v.units
new_data[k] = v.copy().d
data = new_data
- elif all([(len(val) == 2) for val in data.values()]):
+ elif all([((not isinstance(val, np.ndarray)) and (len(val) == 2))
+ for val in data.values()]):
new_data, field_units = {}, {}
for field in data:
try:
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