code: def struct_to_ndarray(arr):
      return arr.view((float, (len(arr.dtype.names),)), type=np.ndarray)
  
file_path: statsmodels/statsmodels/tools/data.py
imports: from statsmodels.compat.numpy import NP_LT_2
  import numpy
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: struct_to_ndarray(arr) and returns: arr