From 9e6b71a4b09f346b582ae7e10f2319afbb43a6f3 Mon Sep 17 00:00:00 2001 From: bhattbhavesh91 Date: Mon, 19 Jun 2017 11:10:29 +0000 Subject: [PATCH] Done --- build.py | 16 ++++++++++++---- build.pyc | Bin 0 -> 694 bytes tests/__init__.pyc | Bin 0 -> 167 bytes tests/test_solution.pyc | Bin 0 -> 1062 bytes 4 files changed, 12 insertions(+), 4 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 e58ff13..2a6665d 100644 --- a/build.py +++ b/build.py @@ -1,7 +1,15 @@ -import numpy as np +""" +Write a Python program to get the unique elements of an array using Numpy. +Sample Output: +Scenario 1: +Original array: [10 10 20 20 30 30] +Unique elements of the above array: [10 20 30] +Scenario 2: +Original array: [[1 1] [2 3]] +Unique elements of the above array: [1 2 3] +""" +import numpy as np def solution(array): - """ - Enter your code here - """ \ No newline at end of file + return np.unique(array) diff --git a/build.pyc b/build.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e690ef079c3602e115c7dec775397ba877a8b81 GIT binary patch literal 694 zcmcIiO;6)65S_GqtfI09Zk%?Gy_7WV0Z}1@vm+L~2nhgYhT~FKU%3Es9Ot2&Zu$X%Ct`?BlRM3$H&G z;`(A?R)kz{6GuTz|CfL8S^jB^@eHQ}9L~O)8JQfaS6btQv;jUW>u*+TkH7)k2k->& z9FU0Y9(S4G7sjZ`T)g&)L! zgFAe)NmIy;1K2a4cOIVkc6Ouh$A_=Jy*;1O_KEO)3FXHC15s2Em5MGDDWl0Mnkh07 zeI;5GonL4&9h$^lq`RMZVuh6-0Nz>lXE|Gcv^6Gm(Rx=`yJnL58p`(omZS$-qB5$c zlTc|YIUQ&ZdIsem0I&j=4Y8FFi-Z!0h;&8fJz8m6Dq3nD)lM9YZQnv~cb zF-(sh;O{?uefTSJvOz#X=yK zK!~y}W}DxoTHZAIwU-W!M`264dbW}{D#c#O&t+Bt;=KLn5(>ihag5A}({``bDe zg5g?bS(TSI%e;&%%gWlc1pXZy2 Lyby+g-7xwE4@Tpr literal 0 HcmV?d00001