0

So why do I get this error? - Picture 1

Picture 1

And is corrected by simply putting a comma? - Picture 2

Picture 2

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
VSK
  • 1

1 Answers1

0
  • In picture 1, you're add two different shapes (4,) and (1,).
  • In picture 2, the shapes are automatically turned to equal (4,) by python. Though I still recommend always keeping equal shapes when writing code, because you never know when you might get an error for unequal sizes/shapes - especially with large arrays/sizes.

Hope this helps!

Ramsha Siddiqui
  • 460
  • 6
  • 20