Write a piece of code that would put the reverse 5 in a variable

Write a piece of code that would put the reverse 5 in

This preview shows page 1 - 2 out of 2 pages.

# Write a piece of code that would put the reverse elements ([14, 13, …, 5]) in a variable reverseA2 # Given a numpy array a3, # create a mask maskA3 that would consist of boolean values (True or False) of whether or not the elements of a3 are even. # Create a4 that consists of all the elements from a3 raised to the power 2.
Image of page 1
# # What’s the average of all elements in a3? The sum? # Given a numpy array a8, how would you create an a9 that only contains array([[9],[5]])? # Given a numpy array a8, how would you create an a9 that only contains [[9], # Using a8 from the previous question, how would you create an a10 that only contains [[1, 3],[4, 6]]?
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Spring '12
  • summet

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture