Skip to content
Snippets Groups Projects
  • Alan De Smet's avatar
    e0647cae
    support GUI Display Data on 0d variables · e0647cae
    Alan De Smet authored
    A 0 dimention numpy array is weird.  It's neither a scalar, nor a 1 dimensional array with a single element. "Display Data" silently refused to work for such values.
    
    This change converts the 0d array into a 1d array with a single element immediately before trying to display it.  Result: Display Data now works on 0d arrays, showing the single value as expected.
    e0647cae
    History
    support GUI Display Data on 0d variables
    Alan De Smet authored
    A 0 dimention numpy array is weird.  It's neither a scalar, nor a 1 dimensional array with a single element. "Display Data" silently refused to work for such values.
    
    This change converts the 0d array into a 1d array with a single element immediately before trying to display it.  Result: Display Data now works on 0d arrays, showing the single value as expected.