[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62870] reshape gives unexpected OOM/dim too l

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #62870] reshape gives unexpected OOM/dim too large error for improper size vector
Date: Sat, 6 Aug 2022 13:05:20 -0400 (EDT)

Follow-up Comment #1, bug #62870 (project octave):

Something like the attached change should help.  With it, I see:

octave:1> a = rand (100,1);
octave:2> b = randi ([0,10],10);
octave:3> reshape (a, b)
error: reshape: can't reshape 100x1 array to

Should we handle errors in dim_vector::safe_numel in some other way than
throwing std::bad_alloc?

Should we issue a different message if the number of dimensions is larger than
some limit (say, 50?) since generating and displaying the exact list of
dimensions is probably meaningless at that point.

(file #53536)


Additional Item Attachment:

File name: reshape-diffs.txt              Size:0 KB


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]