@np.deprecate(message='scipy.stats.histogram2 is deprecated in scipy 0.16.0; use np.histogram2d instead')
def histogram2(a, bins):
 n = np.searchsorted(np.sort(a), bins)
 n = np.concatenate([n, [len(a)]])
 return (n[1:] - n[:(-1)])

@ np . deprecate ( message = 'scipy.stats.histogram2 is deprecated in scipy 0.16.0; use np.histogram2d instead' ) def histogram2 ( a , bins ) : n = np . searchsorted ( np . sort ( a ) , bins ) n = np . concatenate ( [ n , [ len ( a ) ] ] ) return ( n [ 1 : ] - n [ : ( - 1 ) ] )
compute histogram using divisions in bins .