Changeset db27a2c in sasview


Ignore:
Timestamp:
Dec 18, 2009 10:43:20 AM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
eb62193
Parents:
a208464
Message:

used numpy instead of scipy for sum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Invariant/invariant.py

    r472b11c rdb27a2c  
    66import math  
    77import numpy 
    8 import scipy 
    98 
    109from DataLoader.data_info import Data1D as LoaderData1D 
     
    137136        if power != None: 
    138137            a = -math.fabs(power) 
    139             b = (scipy.sum(fx) - a*scipy.sum(self.data.x[self.idx]/sigma2))/scipy.sum(numpy.ones(len(sigma2))/sigma2) 
     138            b = (numpy.sum(fx) - a*numpy.sum(self.data.x[self.idx]/sigma2))/numpy.sum(numpy.ones(len(sigma2))/sigma2) 
    140139            return a, b 
    141140        else: 
Note: See TracChangeset for help on using the changeset viewer.