Ignore:
Timestamp:
Jan 15, 2009, 11:03:42 AM (15 years ago)
Author:
rwilson
Message:

Changed .array(A) to .array(A, num.Int) where appropriate. Helps when going to numpy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/general_mesh.py

    r6166 r6174  
    185185            #   - Stored as six floats n0x,n0y,n1x,n1y,n2x,n2y per triangle
    186186
    187             n0 = num.array([x2 - x1, y2 - y1])
     187            n0 = num.array([x2 - x1, y2 - y1], num.Float)
    188188            l0 = num.sqrt(num.sum(n0**2))
    189189
    190             n1 = num.array([x0 - x2, y0 - y2])
     190            n1 = num.array([x0 - x2, y0 - y2], num.Float)
    191191            l1 = num.sqrt(num.sum(n1**2))
    192192
    193             n2 = num.array([x1 - x0, y1 - y0])
     193            n2 = num.array([x1 - x0, y1 - y0], num.Float)
    194194            l2 = num.sqrt(num.sum(n2**2))
    195195
     
    273273            if not self.geo_reference.is_absolute():
    274274                return V + num.array([self.geo_reference.get_xllcorner(),
    275                                       self.geo_reference.get_yllcorner()])
     275                                      self.geo_reference.get_yllcorner()], num.Float)
    276276            else:
    277277                return V
     
    315315            if absolute is True and not self.geo_reference.is_absolute():
    316316                offset=num.array([self.geo_reference.get_xllcorner(),
    317                                   self.geo_reference.get_yllcorner()])
     317                                  self.geo_reference.get_yllcorner()], num.Float)
    318318                return num.array([V[i3,:]+offset,
    319319                                  V[i3+1,:]+offset,
    320                                   V[i3+2,:]+offset])
     320                                  V[i3+2,:]+offset], num.Float)
    321321            else:
    322                 return num.array([V[i3,:], V[i3+1,:], V[i3+2,:]])
     322                return num.array([V[i3,:], V[i3+1,:], V[i3+2,:]], num.Float)
    323323               
    324324
Note: See TracChangeset for help on using the changeset viewer.