jeudi 28 juin 2018

TypeError: 'tuple' object cannot be interpreted as an integer

I have x0 which is a float64 (64,64) array. Whenever I try this:

    delta = np.random.randn(x0.shape)

It gives the captioned error. This is so basic that I'm wrapping my heads around it. What am I missing out? Thanks

The complete traceback is as follows:

Traceback (most recent call last):

  File "<ipython-input-31-dcd2365ed519>", line 1, in <module>
    delta = np.random.randn(x0.shape)

  File "mtrand.pyx", line 1420, in mtrand.RandomState.randn

  File "mtrand.pyx", line 1550, in mtrand.RandomState.standard_normal

  File "mtrand.pyx", line 167, in mtrand.cont0_array

TypeError: 'tuple' object cannot be interpreted as an integer




Aucun commentaire:

Enregistrer un commentaire