/usr/lib/python2.7/dist-packages/Scientific/Geometry/__init__.py is in python-scientific 2.9.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # Subpackage Scientific.Geometry
#
# Written by: Konrad Hinsen <konrad.hinsen@cnrs-orleans.fr>
#
"""
Geometrical quantities and objects
The geometrical quantities are vectors and tensors, transformations,
and quaternions as descriptions of rotations. There are also tensor
fields, which were included here (rather than in
L{Scientific.Functions}) because they are most often used in a
geometric context. Finally, there are classes for elementary
geometrical objects such as spheres and planes.
@undocumented: VectorModule*
@undocumented: TensorModule*
"""
# Pretend that Vector and Tensor are defined directly
# in Scientific.Geometry.
try:
import Scientific._vector
Vector = Scientific._vector.Vector
isVector = Scientific._vector.isVector
except ImportError:
import VectorModule
Vector = VectorModule.Vector
isVector = VectorModule.isVector
del VectorModule
import TensorModule
Tensor = TensorModule.Tensor
isTensor = TensorModule.isTensor
del TensorModule
# Some useful constants
ex = Vector(1., 0., 0.)
ey = Vector(0., 1., 0.)
ez = Vector(0., 0., 1.)
nullVector = Vector(0., 0., 0.)
delta = Tensor([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])
epsilon = Tensor([[[ 0, 0, 0],
[ 0, 0, 1],
[ 0, -1, 0]],
[[ 0, 0, -1],
[ 0, 0, 0],
[ 1, 0, 0]],
[[ 0, 1, 0],
[-1, 0, 0],
[ 0, 0, 0]]])
import sys
if sys.modules.has_key('epydoc'):
import VectorModule, TensorModule
Vector = VectorModule.Vector
isVector = VectorModule.isVector
vm_name = VectorModule.__name__
tm_name = TensorModule.__name__
Vector.__module__ = 'Scientific.Geometry'
Tensor.__module__ = 'Scientific.Geometry'
isVector.func_globals['__name__'] = 'Scientific.Geometry'
isTensor.func_globals['__name__'] = 'Scientific.Geometry'
VectorModule.__name__ = vm_name
TensorModule.__name__ = tm_name
del VectorModule
del TensorModule
del vm_name
del tm_name
del sys
|