parameters: (bit_map, input)
return_statement: return result
docstring: Converts a bit_map (integer or array) into a numpy array
docstring_summary: Converts a bit_map (integer or array) into a numpy array
docstring_tokens: Converts a bit_map ( integer or array ) into a numpy array
function: def bit_map_as_numpy_array(bit_map, input):
      """Converts a bit_map (integer or array) into a numpy array"""
  
      result = None
      if (type(bit_map) == int):
          length = C.reshape(input, (-1))
          result = [bit_map] * length.shape[0]
          result = np.asarray(result)
          result = result.reshape(input.shape)
      else:
          result = np.asarray(bit_map)
      assert (result.shape == input.shape)
      return result
function_tokens: def bit_map_as_numpy_array ( bit_map , input ) : result = None if ( type ( bit_map ) == int ) : length = C . reshape ( input , ( - 1 ) ) result = [ bit_map ] * length . shape [ 0 ] result = np . asarray ( result ) result = result . reshape ( input . shape ) else : result = np . asarray ( bit_map ) assert ( result . shape == input . shape ) return result