How can I set infinity as an element of a matrix in python(numpy)?
Question: This is the program

    
    
    import numpy as n
    m = complex('inf')
    z=n.empty([2,2] , dtype = complex)
    z=n.array(input() , dtype = complex )
    

but in the console when i give 'm' as an input i get the following error
massage: 'NameError: name 'm' is not defined'


Answer: Infinity in python can be typed as:

float('inf') / float('-inf')

or simply as a number

1e500 (+inf)

-1e500 (-inf)

