On 7/2/2012 12:17 PM Ali Torkamani said...
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

This appears to be somewhat common as if you google for 'spyder sitecustomize' you'll get lots of hits and references.

I'd start there -- it certainly doesn't seem to be a learning python issue.

Emile





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


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to