mailr12849 - in /1.3/extern/scientific_python: Geometry/ IO/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 03, 2011 - 17:57:
Author: bugman
Date: Fri Jun  3 17:57:07 2011
New Revision: 12849

URL: http://svn.gna.org/viewcvs/relax?rev=12849&view=rev
Log:
Fixes for the Scientific python parts included with relax for the module path.


Modified:
    1.3/extern/scientific_python/Geometry/TensorModule.py
    1.3/extern/scientific_python/Geometry/VectorModule.py
    1.3/extern/scientific_python/IO/ArrayIO.py
    1.3/extern/scientific_python/IO/PDB.py
    1.3/extern/scientific_python/IO/PDBSpaceGroups.py

Modified: 1.3/extern/scientific_python/Geometry/TensorModule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/extern/scientific_python/Geometry/TensorModule.py?rev=12849&r1=12848&r2=12849&view=diff
==============================================================================
--- 1.3/extern/scientific_python/Geometry/TensorModule.py (original)
+++ 1.3/extern/scientific_python/Geometry/TensorModule.py Fri Jun  3 17:57:07 
2011
@@ -5,7 +5,7 @@
 # last revision: 2006-11-23
 #
 
-from scientific_python import N; Numeric = N
+from extern.scientific_python import N; Numeric = N
 
 class Tensor:
 
@@ -66,7 +66,7 @@
         return Tensor(other.array-self.array, 1)
 
     def __mul__(self, other):
-        from scientific_python import Geometry
+        from extern.scientific_python import Geometry
         if isTensor(other):
             a = self.array[self.rank*(slice(None),)+(N.NewAxis,)]
             b = other.array[other.rank*(slice(None),)+(N.NewAxis,)]
@@ -110,10 +110,10 @@
     def asVector(self):
         """
         @returns: an equivalent vector object
-        @rtype: L{scientific_python.Geometry.Vector}
+        @rtype: L{extern.scientific_python.Geometry.Vector}
         @raises ValueError: if rank > 1
         """
-        from scientific_python import Geometry
+        from extern.scientific_python import Geometry
         if self.rank == 1:
             return Geometry.Vector(self.array)
         else:
@@ -191,7 +191,7 @@
         @raises ValueError: if rank !=2 
         """
         if self.rank == 2:
-            from scientific_python.LA import eigenvalues
+            from extern.scientific_python.LA import eigenvalues
             return eigenvalues(self.array)
         else:
             raise ValueError('Undefined operation')
@@ -204,7 +204,7 @@
         @raises ValueError: if rank !=2 
         """
         if self.rank == 2:
-            from scientific_python.LA import eigenvectors
+            from extern.scientific_python.LA import eigenvectors
             ev, vectors = eigenvectors(self.array)
             return ev, Tensor(vectors)
         else:
@@ -217,7 +217,7 @@
         @raises ValueError: if rank !=2 
         """
         if self.rank == 2:
-            from scientific_python.LA import inverse
+            from extern.scientific_python.LA import inverse
             return Tensor(inverse(self.array))
         else:
             raise ValueError('Undefined operation')

Modified: 1.3/extern/scientific_python/Geometry/VectorModule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/extern/scientific_python/Geometry/VectorModule.py?rev=12849&r1=12848&r2=12849&view=diff
==============================================================================
--- 1.3/extern/scientific_python/Geometry/VectorModule.py (original)
+++ 1.3/extern/scientific_python/Geometry/VectorModule.py Fri Jun  3 17:57:07 
2011
@@ -6,7 +6,7 @@
 # last revision: 2008-8-27
 #
 
-from scientific_python import N; Numeric = N
+from extern.scientific_python import N; Numeric = N
 
 
 class Vector:
@@ -82,7 +82,7 @@
         return Vector(other.array-self.array)
 
     def __mul__(self, other):
-        from scientific_python import Geometry
+        from extern.scientific_python import Geometry
         if isVector(other):
             return Numeric.add.reduce(self.array*other.array)
         elif Geometry.isTensor(other):
@@ -97,7 +97,7 @@
             return Vector(Numeric.multiply(self.array, other))
 
     def __rmul__(self, other):
-        from scientific_python import Geometry
+        from extern.scientific_python import Geometry
         if Geometry.isTensor(other):
             product = other.dot(Geometry.Tensor(self.array))
             if product.rank == 1:
@@ -183,20 +183,20 @@
     def asTensor(self):
         """
         @returns: an equivalent rank-1 tensor object
-        @rtype: L{scientific_python.Geometry.Tensor}
-        """
-        from scientific_python import Geometry
+        @rtype: L{extern.scientific_python.Geometry.Tensor}
+        """
+        from extern.scientific_python import Geometry
         return Geometry.Tensor(self.array, 1)
 
     def dyadicProduct(self, other):
         """
         @param other: a vector or a tensor
-        @type other: L{Vector} or L{scientific_python.Geometry.Tensor}
+        @type other: L{Vector} or L{extern.scientific_python.Geometry.Tensor}
         @returns: the dyadic product with other
-        @rtype: L{scientific_python.Geometry.Tensor}
+        @rtype: L{extern.scientific_python.Geometry.Tensor}
         @raises TypeError: if other is not a vector or a tensor
         """
-        from scientific_python import Geometry
+        from extern.scientific_python import Geometry
         if isVector(other):
             return Geometry.Tensor(self.array[:, N.NewAxis]
                                    * other.array[N.NewAxis, :], 1)

Modified: 1.3/extern/scientific_python/IO/ArrayIO.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/extern/scientific_python/IO/ArrayIO.py?rev=12849&r1=12848&r2=12849&view=diff
==============================================================================
--- 1.3/extern/scientific_python/IO/ArrayIO.py (original)
+++ 1.3/extern/scientific_python/IO/ArrayIO.py Fri Jun  3 17:57:07 2011
@@ -22,11 +22,11 @@
 
 Numbers in files to be read must conform to Python/C syntax.  For
 reading files containing Fortran-style double-precision numbers
-(exponent prefixed by D), use the module 
L{scientific_python.IO.FortranFormat}.
+(exponent prefixed by D), use the module 
L{extern.scientific_python.IO.FortranFormat}.
 """
 
-from scientific_python.IO.TextFile import TextFile
-from scientific_python import N; Numeric = N
+from extern.scientific_python.IO.TextFile import TextFile
+from extern.scientific_python import N; Numeric = N
 import string
 
 def readArray(filename):

Modified: 1.3/extern/scientific_python/IO/PDB.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/extern/scientific_python/IO/PDB.py?rev=12849&r1=12848&r2=12849&view=diff
==============================================================================
--- 1.3/extern/scientific_python/IO/PDB.py (original)
+++ 1.3/extern/scientific_python/IO/PDB.py Fri Jun  3 17:57:07 2011
@@ -64,10 +64,10 @@
 @undocumented: DummyChain
 """
 
-from scientific_python.IO.TextFile import TextFile
-from scientific_python.IO.FortranFormat import FortranFormat, FortranLine
-from scientific_python.Geometry import Vector, Tensor
-from scientific_python import N
+from extern.scientific_python.IO.TextFile import TextFile
+from extern.scientific_python.IO.FortranFormat import FortranFormat, 
FortranLine
+from extern.scientific_python.Geometry import Vector, Tensor
+from extern.scientific_python import N
 from PDBExportFilters import export_filters
 import copy, string
 
@@ -142,7 +142,7 @@
     X{PDB} file with access at the record level
 
     The low-level file access is handled by the module
-    L{scientific_python.IO.TextFile}, therefore compressed files and URLs
+    L{extern.scientific_python.IO.TextFile}, therefore compressed files and 
URLs
     (for reading) can be used as well.
     """
 
@@ -154,7 +154,7 @@
         @type mode: C{str}
         @param subformat: indicates a specific dialect of the PDB format.
                           Subformats are defined in
-                          L{scientific_python.IO.PDBExportFilters}; they are 
used
+                          L{extern.scientific_python.IO.PDBExportFilters}; 
they are used
                           only when writing.
         @type subformat: C{str} or C{NoneType}
         """
@@ -407,7 +407,7 @@
         @param name: the atom name
         @type name: C{str}
         @param position: the atom position
-        @type position: L{scientific_python.Geometry.Vector}
+        @type position: L{extern.scientific_python.Geometry.Vector}
         @param occupancy: the occupancy
         @type occupancy: C{float}
         @param temperature_factor: the temperature factor (B-factor)
@@ -529,7 +529,7 @@
         @param name: the atom name
         @type name: C{str}
         @param position: the atom position
-        @type position: L{scientific_python.Geometry.Vector}
+        @type position: L{extern.scientific_python.Geometry.Vector}
         @param properties: any other atom properties as keyword parameters.
                            These properties are stored in the atom object
                            and can be accessed by indexing, as for
@@ -1378,7 +1378,7 @@
                     self._scale_matrix = {}
                 self._scale_matrix[type[-1]] = data
                 if type[-1] == '3': # last line read
-                    from scientific_python.Geometry.Transformation \
+                    from extern.scientific_python.Geometry.Transformation \
                          import Shear, Translation
                     l1 = self._scale_matrix['1']
                     l2 = self._scale_matrix['2']
@@ -1395,7 +1395,7 @@
                     self._ncs_matrix = {}
                 self._ncs_matrix[type[-1]] = data
                 if type[-1] == '3': # last line read
-                    from scientific_python.Geometry.Transformation \
+                    from extern.scientific_python.Geometry.Transformation \
                          import Rotation, Translation
                     l1 = self._ncs_matrix['1']
                     l2 = self._ncs_matrix['2']
@@ -1453,7 +1453,7 @@
 
     def findSpaceGroupTransformations(self):
         if self.space_group is not None and self.to_fractional is not None:
-            from scientific_python.IO.PDBSpaceGroups import \
+            from extern.scientific_python.IO.PDBSpaceGroups import \
                  getSpaceGroupTransformations
             try:
                 trs = getSpaceGroupTransformations(self.space_group)

Modified: 1.3/extern/scientific_python/IO/PDBSpaceGroups.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/extern/scientific_python/IO/PDBSpaceGroups.py?rev=12849&r1=12848&r2=12849&view=diff
==============================================================================
--- 1.3/extern/scientific_python/IO/PDBSpaceGroups.py (original)
+++ 1.3/extern/scientific_python/IO/PDBSpaceGroups.py Fri Jun  3 17:57:07 2011
@@ -2,9 +2,9 @@
 # obtained from the Computational Crystallography Toolbox
 #
 
-from scientific_python.Geometry import Vector, Tensor
-from scientific_python.Geometry.Transformation import Rotation, Translation
-from scientific_python import N
+from extern.scientific_python.Geometry import Vector, Tensor
+from extern.scientific_python.Geometry.Transformation import Rotation, 
Translation
+from extern.scientific_python import N
 
 class SpaceGroup(object):
 




Related Messages


Powered by MHonArc, Updated Fri Jun 03 18:00:02 2011