Changeset 9a5097c in sasview for test/pr_inversion


Ignore:
Timestamp:
Mar 26, 2017 11:33:16 PM (8 years ago)
Author:
andyfaff
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
ed2276f
Parents:
9146ed9
Message:

MAINT: import numpy as np

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/pr_inversion/test/utest_invertor.py

    rb699768 r9a5097c  
    568568     
    569569def load(path = "sphere_60_q0_2.txt"): 
    570     import numpy, math, sys 
     570    import numpy as np 
     571    import math 
     572    import sys 
    571573    # Read the data from the data file 
    572     data_x   = numpy.zeros(0) 
    573     data_y   = numpy.zeros(0) 
    574     data_err = numpy.zeros(0) 
     574    data_x   = np.zeros(0) 
     575    data_y   = np.zeros(0) 
     576    data_err = np.zeros(0) 
    575577    scale    = None 
    576578    if not path == None: 
     
    589591                        scale = 0.15*math.sqrt(y) 
    590592                    err = scale*math.sqrt(y) 
    591                 data_x = numpy.append(data_x, x) 
    592                 data_y = numpy.append(data_y, y) 
    593                 data_err = numpy.append(data_err, err) 
     593                data_x = np.append(data_x, x) 
     594                data_y = np.append(data_y, y) 
     595                data_err = np.append(data_err, err) 
    594596            except: 
    595597                pass 
Note: See TracChangeset for help on using the changeset viewer.