[Tutor] sitecustomize

Ali Torkamani torkamani at gmail.com
Mon Jul 2 21:17:49 CEST 2012


Hi,
I'm absolutely newbie, and appreciate your help, I'm using Spyder, some
times it randomly get the following error:

'import sitecustomize' failed; use -v for traceback

while, I'm not importing and have no idea what is importing it, this
happens even if my code is as simple as following:

import sys
import pdb
#import traceback
import numpy as np
#import scipy as sp

#import cmath


class GaussianProcess(object):
    def __init__(self,data=None,data_mask=None):
        self.data,self.data_mask=data,data_mask
        if data==None and data_mask==None:
            self.GeneraterandomData(100,5,3,2)


    def GeneraterandomData(self,N,C,Lag,nUnknown): # N number of Samples,
C: number of features, Lag: Number of autoregressions, nUnknown: number of
unknown features at each time
         pdb.set_trace()
         self.data=np.random.rand(N,C)
         self.data_mask=np.ones((Lag,C))
         self.data_mask[0,0:nUnknown]=0

         return self.data,self.data_mask


def main(argv=None):
    if argv==None:
        argv=sys.argv

   GP=GaussianProcess();
    #print(GP.data,GP.data_mask)



    print("Done!")


if __name__=="__main__":
    sys.exit(main())


Thanks,

Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120702/6b78c2e8/attachment.html>


More information about the Tutor mailing list