Bug when try show exception related to input dimensions

Message error:
`TypeError: 'int' object is not callable In Python`

This is because `size` is a integer object, not a method.
Merge pull request #1512 from DavidRagazzi/patch-1

Bug when try show exception related to input dimensions