ACCESSING ELEMENTS OF NDARRAY IN NUMPY - PYTHON PROGRAMMING

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 11

  • @rojadsorum9515
    @rojadsorum9515 2 роки тому

    what about geomspace please tell us about geomspace

  • @Shonuyadav6764
    @Shonuyadav6764 4 роки тому +1

    Sir.. Me video purthiga chudakapoyina.. Me manual efforts ki like vesthunna and subscriber ayeppoya sir..chaala neat ga ,baaga chepthunaru

  • @jubinthomas7041
    @jubinthomas7041 2 роки тому

    thank you sir,

  • @vishalmane3139
    @vishalmane3139 2 роки тому

    How to know 1 d or 2d

    • @DennySatyala
      @DennySatyala Місяць тому

      by using np.ndim

    • @DennySatyala
      @DennySatyala Місяць тому

      import numpy as np
      a1 = [[1,2,3],[4,5,6]]
      arr = np.array(a1)
      if arr.ndim == 0:
      print(arr)
      elif arr.ndim == 1:
      row = 1
      col = arr.size
      for i in range(row):
      for j in range(col):
      print(arr[i][j], end = " ")
      print()
      else:
      size = arr.shape
      row = size[0]
      col = size[1]
      for i in range(row):
      for j in range(col):
      print(arr[i][j], end = " ")
      print()

  • @pointofview6161
    @pointofview6161 2 роки тому +1

    Sir still we are not clarity on dimensions

    • @jubinthomas7041
      @jubinthomas7041 2 роки тому

      ndim() can be used to find the dimension
      1D - list inside a function
      2D - list of the list inside a function
      3D- list of list of list inside a function,
      with the addition of each list, comes an extra square bracket