[yt-svn] commit/yt: bwkeller: Merged in ngoldbaum/yt (pull request #1678)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Aug 6 09:10:53 PDT 2015
1 new commit in yt:
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