Changeset 725ee36 in sasmodels


Ignore:
Timestamp:
Aug 16, 2016 12:20:15 AM (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:
fe496dd
Parents:
ac98886
Message:

clean up meshgrid cruft handling

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    r672978c r725ee36  
    3333except ImportError: 
    3434    pass 
    35  
    36 try: 
    37     np.meshgrid([]) 
    38     meshgrid = np.meshgrid 
    39 except Exception: 
    40     # CRUFT: np.meshgrid requires multiple vectors 
    41     def meshgrid(*args): 
    42         """Allow meshgrid with a single argument""" 
    43         if len(args) > 1: 
    44             return np.meshgrid(*args) 
    45         else: 
    46             return [np.asarray(v) for v in args] 
    4735 
    4836# TODO: refactor composite model support 
  • sasmodels/details.py

    rbde38b5 r725ee36  
    2020    np.meshgrid([]) 
    2121    meshgrid = np.meshgrid 
    22 except ValueError: 
     22except Exception: 
    2323    # CRUFT: np.meshgrid requires multiple vectors 
    2424    def meshgrid(*args): 
Note: See TracChangeset for help on using the changeset viewer.