05-02-2006 03:00 PM
05-02-2006 05:04 PM
(1) Loop on the entire array and use the replace function to set every element e.g. to NaN
OR
Use reshape array and set the array size to 0.
Best performance will be achieved with the replace function. You should furthermore create an array of constant length (which would also satisfy your 2nd question) and exclusively work with the replace function to achieve best performance.
(2) A good compromise between not writing to the disk too often and preventing data loss might be:
Write the array every second to the disk.