[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Aug 6 09:10:51 PDT 2015


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/8d2361a1519d/
Changeset:   8d2361a1519d
Branch:      yt
User:        ngoldbaum
Date:        2015-08-05 16:10:22+00:00
Summary:     Removing vestigial Quantity class.

This is not used anywhere, so let's just remove it from the repo.
Affected #:  1 file

diff -r fffa77d2fdc205b54fb87befaa50ade850f826d6 -r 8d2361a1519ded798f5a7199e07b17e6b4872567 yt/utilities/quantities.py
--- a/yt/utilities/quantities.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Some old field names.
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-import numpy as np
-
-from yt.units.yt_array import YTArray
-from yt.units.unit_object import Unit
-from yt.utilities.exceptions import YTUnitOperationError
-
-
-class Quantity(YTArray):
-    """
-    A physical quantity. Attaches units to a scalar.
-
-    """
-    def __new__(cls, input_array, input_units=None):
-        if isinstance(input_array, Quantity):
-            return input_array
-
-        # Input array is an already formed ndarray instance
-        # We first cast to be our class type
-        obj = np.asarray(input_array).view(cls)
-
-        # Restrict the array to a scalar.
-        if obj.size != 1:
-            raise ValueError("A Quantity can contain only one element. The "
-                "caller provided the array %s with %s elements."
-                % (obj, obj.size))
-
-        return YTArray.__new__(cls, input_array, input_units)


https://bitbucket.org/yt_analysis/yt/commits/6648a426534a/
Changeset:   6648a426534a
Branch:      yt
User:        bwkeller
Date:        2015-08-06 16:10:42+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1678)

Removing vestigial Quantity class.
Affected #:  1 file

diff -r 84097e00d5acbd688b998c638519237b86cffc50 -r 6648a426534a851be61dd12f996256c2ca2e99b9 yt/utilities/quantities.py
--- a/yt/utilities/quantities.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Some old field names.
-
-
-
-"""
-
-#-----------------------------------------------------------------------------
-# Copyright (c) 2013, yt Development Team.
-#
-# Distributed under the terms of the Modified BSD License.
-#
-# The full license is in the file COPYING.txt, distributed with this software.
-#-----------------------------------------------------------------------------
-
-import numpy as np
-
-from yt.units.yt_array import YTArray
-from yt.units.unit_object import Unit
-from yt.utilities.exceptions import YTUnitOperationError
-
-
-class Quantity(YTArray):
-    """
-    A physical quantity. Attaches units to a scalar.
-
-    """
-    def __new__(cls, input_array, input_units=None):
-        if isinstance(input_array, Quantity):
-            return input_array
-
-        # Input array is an already formed ndarray instance
-        # We first cast to be our class type
-        obj = np.asarray(input_array).view(cls)
-
-        # Restrict the array to a scalar.
-        if obj.size != 1:
-            raise ValueError("A Quantity can contain only one element. The "
-                "caller provided the array %s with %s elements."
-                % (obj, obj.size))
-
-        return YTArray.__new__(cls, input_array, input_units)

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