diff --git a/q01_zeros_array/build.py b/q01_zeros_array/build.py index 5501f7a..95b7a54 100644 --- a/q01_zeros_array/build.py +++ b/q01_zeros_array/build.py @@ -1,8 +1,16 @@ +# %load q01_zeros_array/build.py # Default Imports import sys, os sys.path.append(os.path.join(os.path.dirname(os.curdir), '..' )) import numpy as np # Your solution +def array_zeros(): + zeros_array = np.zeros(((3,4,2))) + return zeros_array + + + + diff --git a/q02_zeros_reshaped/build.py b/q02_zeros_reshaped/build.py index ed629c7..a15ffc9 100644 --- a/q02_zeros_reshaped/build.py +++ b/q02_zeros_reshaped/build.py @@ -1,5 +1,14 @@ +# %load q02_zeros_reshaped/build.py # Default imports import numpy as np from greyatomlib.python_intermediate.q01_zeros_array.build import array_zeros # Write your code + +arr1 = np.arange(0,9).reshape((3,3)) +arr1 +def array_reshaped_zeros(arr = array_zeros()): + return arr.reshape(((2,3,4))) +array_reshaped_zeros() + + diff --git a/q03_create_3d_array/build.py b/q03_create_3d_array/build.py index 7bb6e2f..092385b 100644 --- a/q03_create_3d_array/build.py +++ b/q03_create_3d_array/build.py @@ -1,4 +1,11 @@ +# %load q03_create_3d_array/build.py # Default Imports import numpy as np -# Enter solution here \ No newline at end of file +# Enter solution here +def create_3d_array(): + N=3*3*3 + return np.arange(0,N).reshape(((3,3,3))) +create_3d_array() + +