Bug 192895 - Numeric.reshape with multidimensional newshape raises ValueError
Summary: Numeric.reshape with multidimensional newshape raises ValueError
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-numeric
Version: rawhide
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Matthew Barnes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-23 20:50 UTC by Brad Aagaard
Modified: 2009-04-06 14:36 UTC (History)
4 users (show)

Fixed In Version: python-numeric-24.2-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-03 18:20:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brad Aagaard 2006-05-23 20:50:38 UTC
Description of problem:

Numeric.reshape raises ValueError exception when newshape has more than 1 
dimension.


Version-Release number of selected component (if applicable):

python-numeric-23.7-2.2.1

How reproducible:

from Numeric import *
x = array([1,2,3,4], Int)
y = reshape(x, (2,2))

Actual results:

Traceback (most recent call last):
  File "aa.py", line 3, in ?
    y = reshape(x, (2,2))
ValueError: total size of new array must be unchanged


Expected results:

y = [[1 2]
    [3 4]]


Additional info:

Same code works fine with numpy-0.9.6-1.fc5. Issue may have been resolved in 
later release of Numeric (release notes of later versions mention fixed to 64 
bit issues). Many fc5 packages depend on python-numeric, so it is not possible 
to simply remove python-numeric and use numpy.

Comment 1 Matthew Barnes 2006-10-30 01:44:33 UTC
Fixed in python-numeric-24.2-1.

Comment 2 Casey Dahlin 2009-04-03 14:38:36 UTC
Bug is still present in RHEL 5. Can we get the patch applied there too?

Comment 3 Matthew Barnes 2009-04-03 18:20:41 UTC
Please open a separate bug for RHEL issues.


Note You need to log in before you can comment on or make changes to this bug.