code: def save_array(self):
          
          title = _( "Save array")
          if self.array_filename is None:
              self.array_filename = getcwd_or_home()
          self.redirect_stdio.emit(False)
          filename, _selfilter = getsavefilename(self, title,
                                                 self.array_filename,
                                                 _("NumPy arrays")+" (*.npy)")
          self.redirect_stdio.emit(True)
          if filename:
              self.array_filename = filename
              data = self.delegate.get_value( self.currentIndex() )
              try:
                  import numpy as np
                  np.save(self.array_filename, data)
              except Exception as error:
                  QMessageBox.critical(self, title,
                                       _("<b>Unable to save array</b>"
                                         "<br><br>Error message:<br>%s"
                                         ) % str(error))
docs: Save array