Skip to content

Files

Latest commit

 

History

History
 
 

q03_create_3d_array

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Numpy array of dimensions (3, 3, 3)

Awesome, you are a quick learner , now let's do some more task to hone your skills of numpy basics.

Write a functioncreate_3d_array that :

  • Calculates the number of values that will be stored in an array of these dimensions. Let's call the count N.
  • Create an array of numbers from 0 to N-1 (total N elements)
  • Reshape this array into the desired dimensions
  • Return the array

Parameters:

This function takes in no parameters

Returns:

Return dtype description
variable numpy.ndarray An array of dimensions (3,3,3)