From 523fd598386a9a702abf4927f3ae77e6f4c391e4 Mon Sep 17 00:00:00 2001 From: birajparikh16 Date: Mon, 26 Jun 2017 16:38:07 +0000 Subject: [PATCH] Done --- build.py | 15 ++++++++++++--- build.pyc | Bin 0 -> 587 bytes tests/__init__.pyc | Bin 0 -> 166 bytes tests/test_solution.pyc | Bin 0 -> 1064 bytes 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 build.pyc create mode 100644 tests/__init__.pyc create mode 100644 tests/test_solution.pyc diff --git a/build.py b/build.py index ca073ba..742238d 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,13 @@ +import numpy as np +x = [[ 1., 1., 1., 1., 1.], [ 1., 1., 1., 1., 1.],[ 1., 1., 1., 1., 1.],[ 1., 1., 1., 1., 1.],[ 1., 1., 1., 1., 1.]] def solution(array): - """ - Enter code here - """ \ No newline at end of file + x = np.array(array) + x[1:-1,1:-1] = 0 + return x + +# solution(x) +# Output : array([[ 1., 1., 1., 1., 1.], +# [ 1., 0., 0., 0., 1.], +# [ 1., 0., 0., 0., 1.], +# [ 1., 0., 0., 0., 1.], +# [ 1., 1., 1., 1., 1.]]) diff --git a/build.pyc b/build.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6f93bcf2089e77eb020b5c43188bd02e75908dc GIT binary patch literal 587 zcmcIh!AiqG5S?vW(V}=3JoMO0UAzJ8viRcIUk$(dS3O-Sc_q4LX8I+m k#U;i1@$s2?nI-Y@dO$TCKr?M}^HWN5Qtd!C7XvW^0NvCl#Q*>R literal 0 HcmV?d00001 diff --git a/tests/test_solution.pyc b/tests/test_solution.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a5be37ceea9b767b856fe53f19e811d68a61767f GIT binary patch literal 1064 zcmcgq%Wl&^6uo07X-QKE8w7t~Aq9&CSs_4F6|5rRR6^~>a^p!esUN{JmZ;>c!Z+~^ zd=3&H0OwwZRPr7i-{bq5J7>m@%4oLAT%7}7BSBg~Xkyf-+ zl=}3IXh(E;|=l?-UC}= zGNwjznY7>@9?rzhVD<+9tiYuuwq;_nF!N~ZQRC6tr}Tt&incyAiW*=19yLAs@UbCU zi;Jyx9x09oT*5h?iS;}A0rG4|o%}I!Y~B0=)uV$^uvP5KdyPuH3A2 z=U?h1liCbLcXFsnL2g;9R%gq0B9ARLj){GB17M|Xow)!W3D^sG;i}Aacx|d=y-6x_ zyLvedKbO_5-6RVgF3MDgOPg9f0kc(EOhCxo6uB0Ka>^)WOFJP(UuNlWhlIu8jLuBGOFVi|h81ck==Kq#{#FFtXSe9_0 eX7}{!!Z