Ignore:
Timestamp:
Apr 4, 2017 12:50:04 PM (8 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
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:
f2940c4
Parents:
463e7ffc (diff), 1779e72 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

After merge conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/plottables.py

    r463e7ffc r9c0f3c17  
    4343# Support for ancient python versions 
    4444import copy 
    45 import numpy 
     45import numpy as np 
    4646import sys 
    4747import logging 
     
    708708                self.dy = None 
    709709            if not has_err_x: 
    710                 dx = numpy.zeros(len(x)) 
     710                dx = np.zeros(len(x)) 
    711711            if not has_err_y: 
    712                 dy = numpy.zeros(len(y)) 
     712                dy = np.zeros(len(y)) 
    713713            for i in range(len(x)): 
    714714                try: 
     
    798798        tempdy = [] 
    799799        if self.dx == None: 
    800             self.dx = numpy.zeros(len(self.x)) 
     800            self.dx = np.zeros(len(self.x)) 
    801801        if self.dy == None: 
    802             self.dy = numpy.zeros(len(self.y)) 
     802            self.dy = np.zeros(len(self.y)) 
    803803        if self.xLabel == "log10(x)": 
    804804            for i in range(len(self.x)): 
     
    828828        tempdy = [] 
    829829        if self.dx == None: 
    830             self.dx = numpy.zeros(len(self.x)) 
     830            self.dx = np.zeros(len(self.x)) 
    831831        if self.dy == None: 
    832             self.dy = numpy.zeros(len(self.y)) 
     832            self.dy = np.zeros(len(self.y)) 
    833833        if self.yLabel == "log10(y)": 
    834834            for i in range(len(self.x)): 
     
    861861        tempdy = [] 
    862862        if self.dx == None: 
    863             self.dx = numpy.zeros(len(self.x)) 
     863            self.dx = np.zeros(len(self.x)) 
    864864        if self.dy == None: 
    865             self.dy = numpy.zeros(len(self.y)) 
     865            self.dy = np.zeros(len(self.y)) 
    866866        if xmin != None and xmax != None: 
    867867            for i in range(len(self.x)): 
     
    12301230 
    12311231def sample_graph(): 
    1232     import numpy as nx 
     1232    import numpy as np 
    12331233 
    12341234    # Construct a simple graph 
    12351235    if False: 
    1236         x = nx.array([1, 2, 3, 4, 5, 6], 'd') 
    1237         y = nx.array([4, 5, 6, 5, 4, 5], 'd') 
    1238         dy = nx.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3]) 
     1236        x = np.array([1, 2, 3, 4, 5, 6], 'd') 
     1237        y = np.array([4, 5, 6, 5, 4, 5], 'd') 
     1238        dy = np.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3]) 
    12391239    else: 
    1240         x = nx.linspace(0, 1., 10000) 
    1241         y = nx.sin(2 * nx.pi * x * 2.8) 
    1242         dy = nx.sqrt(100 * nx.abs(y)) / 100 
     1240        x = np.linspace(0, 1., 10000) 
     1241        y = np.sin(2 * np.pi * x * 2.8) 
     1242        dy = np.sqrt(100 * np.abs(y)) / 100 
    12431243    data = Data1D(x, y, dy=dy) 
    12441244    data.xaxis('distance', 'm') 
Note: See TracChangeset for help on using the changeset viewer.