Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
@@ -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
"""
return np.unique(array)
Binary file added build.pyc
Binary file not shown.
Binary file added tests/__init__.pyc
Binary file not shown.
Binary file added tests/test_solution.pyc
Binary file not shown.