parameters: ()
docstring: Run the benchmarks.
docstring_summary: Run the benchmarks.
docstring_tokens: Run the benchmarks .
function: def main():
      """Run the benchmarks."""
      print_version()
  
      dtypes = [
          "float64",
          "float32",
          "int32",
          "int16",
          "int8",
          "uint32",
          "uint16",
          "uint8",
          "complex64",
          "complex128"
      ]
      iters = ITERATIONS
      n = 1
      while n < 1e7:
          n *= 10
          for i in range(0, len(dtypes)):
              dtype = dtypes[i]
              name = ":len="+str(n)+",dtype="+dtype
              setup = "import numpy as np;"
              setup += "A = np.ones([1,"+str(n)+"], dtype='float64');"
              stmt = "B = A.astype('"+dtype+"')"
              benchmark(name, setup, stmt, iters)
          iters //= 4
  
      print_summary(COUNT[0], COUNT[0])
function_tokens: def main ( ) : print_version ( ) dtypes = [ "float64" , "float32" , "int32" , "int16" , "int8" , "uint32" , "uint16" , "uint8" , "complex64" , "complex128" ] iters = ITERATIONS n = 1 while n < 1e7 : n *= 10 for i in range ( 0 , len ( dtypes ) ) : dtype = dtypes [ i ] name = ":len=" + str ( n ) + ",dtype=" + dtype setup = "import numpy as np;" setup += "A = np.ones([1," + str ( n ) + "], dtype='float64');" stmt = "B = A.astype('" + dtype + "')" benchmark ( name , setup , stmt , iters ) iters //= 4 print_summary ( COUNT [ 0 ] , COUNT [ 0 ] )