Avatar ·

The whole of integers: Typeerror: Only Length-1 Arrays Can Be Converted to Python Scalars

📁 python, ошибка, numpy, matplotlib

   IMPORT  ScipY  Import  ScientpAc  Import  cmath   import  math  import  matplotlib.pyplot  as  print   Import  numpy  as  np  from  scipy  idl  from  scipy.signal  import  freeqs, irfilterxx = np.linespace ( 0 ,  1024 ,  1024 ) # the range of values ​​x  byts = ([ 0 ,  0 , the  0 ,  0 ,  1 ,  0 ,  1 ,  0 ,  0 ,  0 ,  1  0 ,  0 ,,,,  0 ,  0 ,  1 ]) ff =  64   2  * np.pi * (x -  1 ) * ff/ 1024 ) # bearing  y = ns * Byts [ round  ( int  (x +  31 )/ plt.plot (y)     

Error:

  Typeerror: Only Length-  1  Arrays can be converted to python scalars    

how to set an array of integers x so that this error does not arise?