# welcome to softhunt.net
# Python program explaining
# binary_repr() function
import numpy as np
num = 15
print ("Input number : ", num)
ans = np.binary_repr(num)
print ("binary representation of 15 : ", ans)
# welcome to softhunt.net
# Python program explaining
# binary_repr() function
import numpy as np
arr = [12, -33 ]
print ("Input array : ", arr)
# binary representation of first array
# element without using width parameter
ans = np.binary_repr(arr[0])
print ("Binary representation of 12 Without using width parameter : ", ans)
# binary representation of first array
# element using width parameter
ans = np.binary_repr(arr[0], width = 7)
print ("Using width parameter: ", ans)
# binary representation of 2nd array
# element without using width parameter
ans = np.binary_repr(arr[1])
print ("Binary representation of -33 Without using width parameter : ", ans)
# binary representation of 2nd array
# element using width parameter
ans = np.binary_repr(arr[1], width = 7)
print ("Using width parameter : ", ans)