Wednesday, 28 September 2022

Python error, "NumPy boolean array indexing assignment requires a 0 or 1-dimensional input, input has 2 dimensions"

I'm kinda new to python, currently working on a project and getting this error with this lines of code.

    g1_coll[obstacle==0]=tau*(g1+g2-g3+g4)
    g2_coll[obstacle==0]=tau*(g1+g2+g3-g4)
    g3_coll[obstacle==0]=tau*(-g1+g2+g3+g4)
    g4_coll[obstacle==0]=tau*(g1-g2+g3+g4)

can anyone help me understand this?



from Python error, "NumPy boolean array indexing assignment requires a 0 or 1-dimensional input, input has 2 dimensions"

No comments:

Post a Comment