Changeset 9a5097c in sasview for test/sasdataloader/plugins


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/sasdataloader/plugins/test_reader.py

    rb699768 r9a5097c  
    88copyright 2008, University of Tennessee 
    99""" 
    10 import numpy, os 
     10import os 
     11import numpy as np 
    1112from sas.sascalc.dataloader.data_info import Data1D 
    1213 
     
    4041                buff = input_f.read() 
    4142                lines = buff.split('\n') 
    42                 x  = numpy.zeros(0) 
    43                 y  = numpy.zeros(0) 
    44                 dy = numpy.zeros(0) 
     43                x  = np.zeros(0) 
     44                y  = np.zeros(0) 
     45                dy = np.zeros(0) 
    4546                output = Data1D(x, y, dy=dy) 
    4647                self.filename = output.filename = basename 
    4748            
    4849                for line in lines: 
    49                     x  = numpy.append(x,  float(line))  
     50                    x  = np.append(x,  float(line)) 
    5051                     
    5152                output.x = x 
Note: See TracChangeset for help on using the changeset viewer.