• Core Java
  • JSP
  • JavaScript
  • Servlet
  • PHP
  • Java IO
  • RubyonRails
  • SQL Tutorial
  • jQuery

  • <

    Numpy Broadcasting

    broadcasting refers to the ability of NumPy to treat arrays of different shapes during arithmetic operations. Arithmetic operations on arrays are usually done on corresponding elements.

    import numpy as np  
    a = np.array([1,2,3,4,5,6,7])  
    b = np.array([2,4,6,8,10,12,14])  
    c = a*b;  
    print(c)  
    

    output
    
    [ 2  8 18 32 50 72 98]
    
    
















    © copyright 2017-2021 Completedone pvt ltd.