[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat Jul 16 08:51:47 PDT 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/a4cbcdc9255b/
Changeset: a4cbcdc9255b
Branch: yt
User: MatthewTurk
Date: 2016-07-08 15:41:16+00:00
Summary: Adding ability to specify a single slice for region expression
Affected #: 1 file
diff -r b264176ae1527a32714dbd782c7f5a3e79dc993a -r a4cbcdc9255bbb5fb758a55a209876df84e8fbb3 yt/data_objects/region_expression.py
--- a/yt/data_objects/region_expression.py
+++ b/yt/data_objects/region_expression.py
@@ -37,6 +37,8 @@
return self.all_data[item]
if isinstance(item, tuple) and isinstance(item[1], string_types):
return self.all_data[item]
+ if isinstance(item, slice):
+ item = tuple(item for _ in range(3))
if len(item) != self.ds.dimensionality:
# Not the right specification, and we don't want to do anything
# implicitly.
https://bitbucket.org/yt_analysis/yt/commits/ad686b57e2a6/
Changeset: ad686b57e2a6
Branch: yt
User: MatthewTurk
Date: 2016-07-08 15:43:02+00:00
Summary: Adding docs
Affected #: 1 file
diff -r a4cbcdc9255bbb5fb758a55a209876df84e8fbb3 -r ad686b57e2a6d0f600e8c625b9d0aee615aa0483 doc/source/analyzing/objects.rst
--- a/doc/source/analyzing/objects.rst
+++ b/doc/source/analyzing/objects.rst
@@ -131,6 +131,16 @@
ds.r[:,-180:0,:]
+If you specify a single slice, it will be repeated along all three dimensions.
+For instance, this will give all data:::
+
+ ds.r[:]
+
+And this will select a box running from 0.4 to 0.6 along all three
+dimensions:::
+
+ ds.r[0.4:0.6]
+
Selecting Fixed Resolution Regions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
https://bitbucket.org/yt_analysis/yt/commits/7aa7cc4199a0/
Changeset: 7aa7cc4199a0
Branch: yt
User: MatthewTurk
Date: 2016-07-08 15:52:07+00:00
Summary: This syntax is better.
Affected #: 1 file
diff -r ad686b57e2a6d0f600e8c625b9d0aee615aa0483 -r 7aa7cc4199a008a39d2283b306ffe0572423f780 yt/data_objects/region_expression.py
--- a/yt/data_objects/region_expression.py
+++ b/yt/data_objects/region_expression.py
@@ -38,7 +38,7 @@
if isinstance(item, tuple) and isinstance(item[1], string_types):
return self.all_data[item]
if isinstance(item, slice):
- item = tuple(item for _ in range(3))
+ item = (item, item, item)
if len(item) != self.ds.dimensionality:
# Not the right specification, and we don't want to do anything
# implicitly.
https://bitbucket.org/yt_analysis/yt/commits/77c1b9653da7/
Changeset: 77c1b9653da7
Branch: yt
User: ngoldbaum
Date: 2016-07-16 15:51:18+00:00
Summary: Merged in MatthewTurk/yt (pull request #2265)
Adding slice repetition for ds.r
Affected #: 2 files
diff -r a4348e453b3f9121fb5abbd2322662d3a84caffc -r 77c1b9653da76332bfe6baccb489f1973ee3c0b1 doc/source/analyzing/objects.rst
--- a/doc/source/analyzing/objects.rst
+++ b/doc/source/analyzing/objects.rst
@@ -131,6 +131,16 @@
ds.r[:,-180:0,:]
+If you specify a single slice, it will be repeated along all three dimensions.
+For instance, this will give all data:::
+
+ ds.r[:]
+
+And this will select a box running from 0.4 to 0.6 along all three
+dimensions:::
+
+ ds.r[0.4:0.6]
+
Selecting Fixed Resolution Regions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff -r a4348e453b3f9121fb5abbd2322662d3a84caffc -r 77c1b9653da76332bfe6baccb489f1973ee3c0b1 yt/data_objects/region_expression.py
--- a/yt/data_objects/region_expression.py
+++ b/yt/data_objects/region_expression.py
@@ -37,6 +37,8 @@
return self.all_data[item]
if isinstance(item, tuple) and isinstance(item[1], string_types):
return self.all_data[item]
+ if isinstance(item, slice):
+ item = (item, item, item)
if len(item) != self.ds.dimensionality:
# Not the right specification, and we don't want to do anything
# implicitly.
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