TypeError: unsupported operand type(s) for -: 'list' and 'list'

前端 未结 4 1007
心在旅途
心在旅途 2020-12-06 04:47

I am trying to implement the Naive Gauss and getting the unsupported operand type error on execution. Output:

  execfile(filename, namespace)
  File \"/media         


        
4条回答
  •  星月不相逢
    2020-12-06 04:57

    This question has been answered but I feel I should also mention another potential cause. This is a direct result of coming across the same error message but for different reasons. If your list/s are empty the operation will not be performed. check your code for indents and typos

提交回复
热议问题