Python Learning Notes (13) Ndarray

Source: Internet
Author: User

Aarray =Array ([4,5,6 = Aarray.reshape (3, 2)#  line sum ()aarray.sum (axis =  0)#  Array ([5, 7, 9])#  column sum aarray.sum (axis = 1)#  Array ([6, +])
  carray = Array ([1, 3, 5 1]darray  = Array ([2, 4, 6 = Array ( [7, 8, 9, Darray, Earray)  #   Array ([7, 4, 6]); CArray The first value is not greater than 2, Take Earray:7  #   CArray the second value is greater than two, take darray:4; CArray the third value is greater than 2, take darray:6    
def Fun (x, y): return (x+1) * (y+1)#  (9, 9) is the sequence size, starting from 0 arr = fromfunction (fun, (9,9))

Python Learning Notes (13) Ndarray

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.