Restricted: Migrate np bits from Wendelin to ERP5

With a254bf50 we
migrated most of np related security code from Wendelin to ERP5, we only
missed few lines. This patch moves the remaining lines to ERP5 so
that all numpy related restricted python code is at one place and no
longer scattered at two different repos/files.

tested at: https://erp5js.nexedi.net/#/test_result_module/20230302-F5352509
3 jobs for erp5-vifib
Status Job ID Name Coverage
  External
passed ERP5.CodingStyleTest-Master

failed ERP5.UnitTest-Master

passed Wendelin.UnitTest-Master