Ignore:
Timestamp:
Apr 8, 2016 12:14:58 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c, a936688, 1ca1fd9
Parents:
65279d8
Message:

use np.sqrt rather than math.sqrt for vector functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/elliptical_cylinder.py

    rec45c4f r416609b  
    8181""" 
    8282 
    83 import math 
    84 from numpy import pi, inf 
     83from numpy import pi, inf, sqrt 
    8584 
    8685name = "elliptical_cylinder" 
     
    117116        @param length: Length of the cylinder 
    118117    """ 
    119     radius = math.sqrt(r_minor * r_minor * axis_ratio) 
     118    radius = sqrt(r_minor * r_minor * axis_ratio) 
    120119    ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 
    121120    return 0.5 * (ddd) ** (1. / 3.) 
Note: See TracChangeset for help on using the changeset viewer.