Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: object array may be self-referencing Python3

TypeError: object array may be self-referencing

I tried to read this question but I didn't get much out of it. TypeError: object array may be self-referencing python

Thanks in advance

like image 643
Monjola Avatar asked Jun 15 '26 01:06

Monjola


1 Answers

Figured it out myself after a while, I had a calculation with numpy arrays and I did not manually specify the datatype so it turned out it was automatically set to dtype=np.object. I fixed it by specifying dtype=np.float64.

myarray = ([[somevalue, somevalue, somevalue],
            [somevalue, somevalue, somevalue],
            [somevalue, somevalue, somevalue]], dtype=np.float64)
like image 154
Monjola Avatar answered Jun 18 '26 01:06

Monjola