# Python program for
      # Creation of Arrays
      import numpy as np
      
      # Creating a rank 1 Array
      arr = np.array([1, 2, 3])
      print("Array with Rank 1: \n",arr)
      
      # Creating a rank 2 Array
      arr = np.array([[1, 2, 3],
          [4, 5, 6]])
      print("Array with Rank 2: \n", arr)
      
      # Creating an array from tuple
      arr = np.array((1, 3, 2))
      print("\nArray created using "
        "passed tuple:\n", arr)
      

      Python language logo
      Numpy

      Creating an array from list

      arr = np.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.