From 15a1d7eaa92e99d98338748526b4e19b2076cc72 Mon Sep 17 00:00:00 2001 From: Jas-simran Date: Tue, 4 Sep 2018 10:10:01 +0000 Subject: [PATCH 1/3] Done --- q01_zeros_array/build.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/q01_zeros_array/build.py b/q01_zeros_array/build.py index 5501f7a..d05f96d 100644 --- a/q01_zeros_array/build.py +++ b/q01_zeros_array/build.py @@ -1,8 +1,9 @@ -# Default Imports -import sys, os -sys.path.append(os.path.join(os.path.dirname(os.curdir), '..' )) +# %load q01_zeros_array/build.py import numpy as np -# Your solution +def array_zeros(): + zeros_array=np.zeros((3,4,2)) + return zeros_array +array_zeros() From 458b6b4dbf14f3c8159155daac7aafb56895e41b Mon Sep 17 00:00:00 2001 From: Jas-simran Date: Tue, 4 Sep 2018 10:25:30 +0000 Subject: [PATCH 2/3] Done --- q02_zeros_reshaped/build.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/q02_zeros_reshaped/build.py b/q02_zeros_reshaped/build.py index ed629c7..935a467 100644 --- a/q02_zeros_reshaped/build.py +++ b/q02_zeros_reshaped/build.py @@ -1,5 +1,15 @@ +# %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 + +def array_reshaped_zeros(): + zeros_array=np.zeros((3,4,2)) + zeros_array_reshaped=zeros_array.reshape((2,3,4)) + return zeros_array_reshaped + +array_reshaped_zeros() + + From 6ed85f51f1dc81ef0b6af8f26b68100a57a3d189 Mon Sep 17 00:00:00 2001 From: Jas-simran Date: Tue, 4 Sep 2018 10:43:18 +0000 Subject: [PATCH 3/3] Done --- q03_create_3d_array/build.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/q03_create_3d_array/build.py b/q03_create_3d_array/build.py index 7bb6e2f..3260b29 100644 --- a/q03_create_3d_array/build.py +++ b/q03_create_3d_array/build.py @@ -1,4 +1,19 @@ +# %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(): + + array1=np.arange(27) + print (array1) + array3d=array1.reshape(3,3,3) + print (array3d) + return(array3d) + + +create_3d_array() + + + +