Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate numeric/numpy changes #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cad/plugins/NanoDynamics-1/TranslateStruts.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import sys
import math

from Numeric import array
from numpy.oldnumeric import array
from LinearAlgebra import inverse

# a nice upgrade would be to read values selected from the NE1 history
Expand Down
2 changes: 1 addition & 1 deletion cad/src/atombase.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ make atombase.so ; valgrind python atombasetests.py >& OUCH; less OUCH
__author__ = "Will"

import types
import Numeric
import numpy.oldnumeric
from foundation.inval import InvalMixin

cdef extern from "atombasehelp.c":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Created 2008-03-10 from copy of DnaSegment_GraphicsMode.py
Recreated 2008-04-02 from copy of DnaSegment_GraphicsMode.py
"""
from Numeric import dot
from numpy.oldnumeric import dot
from PyQt4.Qt import QMouseEvent

from cnt.commands.BuildNanotube.BuildNanotube_GraphicsMode import BuildNanotube_GraphicsMode
Expand Down
2 changes: 1 addition & 1 deletion cad/src/cnt/model/NanotubeParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from math import sin, cos, pi
from math import atan2
from Numeric import dot, argmax, argmin, sqrt
from numpy.oldnumeric import dot, argmax, argmin, sqrt

from model.chem import Atom
from model.bonds import bond_atoms
Expand Down
2 changes: 1 addition & 1 deletion cad/src/command_support/GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"""

import math # just for pi
from Numeric import exp
from numpy.oldnumeric import exp

from PyQt4.Qt import Qt
from PyQt4.Qt import QMenu
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/BuildAtoms/BuildAtoms_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


import math
from Numeric import dot
from numpy.oldnumeric import dot

from OpenGL.GL import GL_FALSE
from OpenGL.GL import glDepthMask
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/BuildCrystal/BuildCrystal_Command.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""

import math # only for pi
from Numeric import size, dot, sqrt, floor
from numpy.oldnumeric import size, dot, sqrt, floor

from OpenGL.GL import GL_COLOR_LOGIC_OP
from OpenGL.GL import GL_DEPTH_TEST
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/BuildCrystal/CrystalShape.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
keep that member around in CSDL.
"""

from Numeric import dot, floor
from numpy.oldnumeric import dot, floor

from geometry.VQT import vlen, V
from OpenGL.GL import glNewList, glEndList, glCallList
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/Extrude/extrudeMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import foundation.env as env
import foundation.changes as changes

from Numeric import dot
from numpy.oldnumeric import dot

from OpenGL.GL import GL_CW
from OpenGL.GL import glFrontFace
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/Move/Move_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""

import math
from Numeric import dot
from numpy.oldnumeric import dot

from PyQt4.Qt import QMouseEvent
from PyQt4.Qt import Qt
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/Rotate/RotateChunks_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""
from utilities import debug_flags
import math
from Numeric import dot, sign
from numpy.oldnumeric import dot, sign
import foundation.env as env
from utilities.Log import redmsg
from utilities.debug import print_compact_stack
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/Select/Select_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
related methods into this class from selectMode.py

"""
from Numeric import dot
from numpy.oldnumeric import dot

from OpenGL.GL import GL_CLIP_PLANE0
from OpenGL.GL import GL_DEPTH_COMPONENT
Expand Down
2 changes: 1 addition & 1 deletion cad/src/commands/Translate/TranslateChunks_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"""
from utilities import debug_flags
import math
from Numeric import dot
from numpy.oldnumeric import dot
import foundation.env as env
from utilities.debug import print_compact_traceback
from geometry.VQT import V, A, vlen, norm
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/commands/BuildDna/BuildDna_GraphicsMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from commands.SelectChunks.SelectChunks_GraphicsMode import SelectChunks_GraphicsMode
from model.chem import Atom
from model.bonds import Bond
from Numeric import dot
from numpy.oldnumeric import dot
from PyQt4.Qt import QMouseEvent
from geometry.VQT import V, Q, A, norm, vlen
from commands.Select.Select_GraphicsMode import DRAG_STICKINESS_LIMIT
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/commands/DnaSegment/DnaSegment_EditCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

from geometry.VQT import V, Veq, vlen
from geometry.VQT import cross, norm
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.constants import gensym
from utilities.Log import redmsg
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/commands/DnaStrand/DnaStrand_EditCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from geometry.VQT import V
from geometry.VQT import vlen
from geometry.VQT import norm
from Numeric import dot
from numpy.oldnumeric import dot

from exprs.State_preMixin import State_preMixin
from exprs.attr_decl_macros import Instance, State
Expand Down
4 changes: 2 additions & 2 deletions cad/src/dna/commands/MakeCrossovers/CrossoverSite_Marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from dna.commands.MakeCrossovers.MakeCrossovers_Handle import MakeCrossovers_Handle

from geometry.VQT import orthodist, norm, vlen, angleBetween
from Numeric import dot
from numpy.oldnumeric import dot
from model.bonds import bond_direction


Expand Down Expand Up @@ -552,4 +552,4 @@ def get_final_crossover_atoms_dict(self):
return self._final_crossover_atoms_dict

def get_final_crossover_pairs(self):
return self.final_crossover_pairs_dict.values()
return self.final_crossover_pairs_dict.values()
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
2008-05-09 - 2008-05-14 Created / modified.

"""
from Numeric import dot
from numpy.oldnumeric import dot
from geometry.VQT import V, norm, vlen
from utilities.constants import applegreen

Expand Down Expand Up @@ -656,4 +656,4 @@ def _determine_numberOfBasePairs_to_change(self):

return numberOfBasesToAddOrRemove



4 changes: 2 additions & 2 deletions cad/src/dna/generators/B_Dna_PAM3_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
LEFT_HANDED = 1

from geometry.VQT import norm
from Numeric import dot
from numpy.oldnumeric import dot
from dna.generators.B_Dna_Generator import B_Dna_Generator

class B_Dna_PAM3_Generator(B_Dna_Generator):
Expand Down Expand Up @@ -375,4 +375,4 @@ def _create_atomLists_for_regrouping(self, dnaGroup):
elif atom.element.symbol in ('Ax3', 'Ae3'):
_axis_list.append(atom)

return (_strandA_list, _strandB_list, _axis_list)
return (_strandA_list, _strandB_list, _axis_list)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"""

from geometry.VQT import Q, norm, vlen, cross
from Numeric import dot
from numpy.oldnumeric import dot
from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets

Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/generators/B_Dna_PAM5_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

from geometry.VQT import V, Q, norm, cross
from geometry.VQT import vlen
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/generators/Dna_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

from geometry.VQT import V, Q, norm, cross
from geometry.VQT import vlen
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/generators/Z_Dna_Atomistic_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

from geometry.VQT import V, Q, norm, cross
from geometry.VQT import vlen
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/generators/Z_Dna_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

from geometry.VQT import V, Q, norm, cross
from geometry.VQT import vlen
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/generators/Z_Dna_PAM5_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

from geometry.VQT import V, Q, norm, cross
from geometry.VQT import vlen
from Numeric import dot
from numpy.oldnumeric import dot

from utilities.debug import print_compact_stack
from model.bonds import bond_at_singlets
Expand Down
2 changes: 1 addition & 1 deletion cad/src/dna/model/DnaLadder.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
undoable state), and is not stored in the mmp file.
"""

from Numeric import dot
from numpy.oldnumeric import dot
from geometry.VQT import cross

from model.elements import Pl5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Numeric import sign
from numpy.oldnumeric import sign

class PositionInWholeChain(object):
"""
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/LearningOpenGL/Craft.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qtcanvas import *
from qtgl import *
from OpenGL.GL import *
import Numeric
import numpy.oldnumeric
import sys
import random
import time
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/LearningOpenGL/Cruft.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def mypaintGL(): bla
from qtcanvas import *
from qtgl import *
from OpenGL.GL import *
import Numeric
import numpy.oldnumeric
import sys
import random
import time
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/pyrex-atoms-bonds/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
import time
import types
import Numeric
import numpy.oldnumeric

# This is a prototype of the desired API for Pyrex atoms, bonds, and
# atom sets. See "Pyrex atoms and bonds" page on the wiki.
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/pyrex-atoms-bonds/smallerFootprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import time
import unittest
import Numeric
import numpy.oldnumeric

stuff = None
#stuff = [ ]
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/pyrex-atoms-bonds/tryit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import time
import unittest
import random
import Numeric
import numpy.oldnumeric
from bases import *

N = int(10**6)
Expand Down
2 changes: 1 addition & 1 deletion cad/src/experimental/pyrex-opengl/bearing_data.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cad/src/experimental/pyrex-opengl/quux.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
import Numeric
import numpy.oldnumeric
import types
import unittest
import random
Expand Down
4 changes: 2 additions & 2 deletions cad/src/exprs/Exprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ def _e_make_argval(self, argval, env, i, ipath):
pass

# same as in basic.py:
from Numeric import dot
from numpy.oldnumeric import dot
from geometry.VQT import V, norm, vlen

class V_expr(OpExpr):
Expand Down Expand Up @@ -1259,7 +1259,7 @@ def _e_make_in(self, env, ipath):
##from VQT import V ###e replace with a type constant -- probably there's one already in state_utils
##V_expr = tuple_Expr ### kluge; even once this is defined, in formulas you may have to use V_expr instead of V,
# unless we redefine V to not try to use float() on exprs inside it -- right now it's def V(*v): return array(v, Float)
# (note: that Float is from Numeric and equals 'd')
# (note: that Float is from numpy.oldnumeric and equals 'd')
##e (maybe we could make a new V def try to use old def, make __float__ asfail so that would fail, then use V_expr if any expr arg)

def canon_expr(subexpr):###CALL ME FROM MORE PLACES -- a comment in Column.py says that env.understand_expr should call this...
Expand Down
2 changes: 1 addition & 1 deletion cad/src/exprs/dna_ribbon_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"""

from math import pi
from Numeric import dot, cos, sin
from numpy.oldnumeric import dot, cos, sin

from OpenGL.GL import GL_LIGHTING
from OpenGL.GL import glDisable
Expand Down
2 changes: 1 addition & 1 deletion cad/src/exprs/draw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from OpenGL.GLU import gluUnProject

from geometry.VQT import norm, A
from Numeric import dot
from numpy.oldnumeric import dot

from array import array
# ==
Expand Down
2 changes: 1 addition & 1 deletion cad/src/exprs/geometry_exprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

"""

from Numeric import dot
from numpy.oldnumeric import dot

from geometry.VQT import planeXline
from geometry.VQT import norm
Expand Down
2 changes: 1 addition & 1 deletion cad/src/exprs/outtakes/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# == imports from python itself

import sys, os
from Numeric import dot
from numpy.oldnumeric import dot

sys.setrecursionlimit(650) # 5000 is set in startup_funcs.py; this will ease debugging, but REMOVE WHEN DEVEL IS DONE [061121]

Expand Down
2 changes: 1 addition & 1 deletion cad/src/files/dpb_trajectory/moviefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os, sys
from struct import unpack # fyi: used for old-format header, no longer for delta frames
## from VQT import A
from Numeric import array, Int8
from numpy.oldnumeric import array, Int8
from utilities import debug_flags
from utilities.debug import print_compact_stack, print_compact_traceback
import foundation.env as env
Expand Down
4 changes: 2 additions & 2 deletions cad/src/foundation/state_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def scan_Numeric_array(obj, func):
return

try:
from Numeric import array, PyObject
from nompy.oldnumeric import array, PyObject
except:
if env.debug() or DEBUG_PYREX_ATOMS:
print "fyi: can't import array, PyObject from Numeric, so not registering its copy & scan functions"
Expand Down Expand Up @@ -2321,7 +2321,7 @@ def __ne__(self, other):

def _test():
print "testing some simple cases of copy_val"
from Numeric import array
from numpy.oldnumeric import array
map( _test1, [2,
3,
"string",
Expand Down
Loading