def expected_bar_values_2d(dates, asset_info, colname):
 if (colname == 'volume'):
  dtype = uint32
  missing = 0
 else:
  dtype = float64
  missing = float('nan')
 assets = asset_info.index
 data = full((len(dates), len(assets)), missing, dtype=dtype)
 for (j, asset) in enumerate(assets):
  start = asset_start(asset_info, asset)
  end = asset_end(asset_info, asset)
  for (i, date) in enumerate(dates):
   if (not (start <= date <= end)):
    continue
   data[(i, j)] = expected_bar_value(asset, date, colname)
 return data

def expected_bar_values_2d ( dates , asset_info , colname ) : if ( colname == 'volume' ) : dtype = uint32 missing = 0 else : dtype = float64 missing = float ( 'nan' ) assets = asset_info . index data = full ( ( len ( dates ) , len ( assets ) ) , missing , dtype = dtype ) for ( j , asset ) in enumerate ( assets ) : start = asset_start ( asset_info , asset ) end = asset_end ( asset_info , asset ) for ( i , date ) in enumerate ( dates ) : if ( not ( start <= date <= end ) ) : continue data [ ( i , j ) ] = expected_bar_value ( asset , date , colname ) return data
return an 2d array containing cls .