Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Tue Dec 10 14:16:22 2019
- @author: usbo2
- """
- import numpy as np
- import scipy as sp
- def concatenate_bin(x):
- return( (x[0] << 3*8) + (x[1] <<2*8 ) + (x[2] << 1*8) + (x[3] ) )
- a=np.random.randint(-128,128,1000)
- ra=a.reshape((int(len(a)/4),4 ))
- res=concatenate_bin(ra)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement