Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Bugs--Bugs Report in List Operation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67519] Bugs--Bugs Report in List Operation
  • From: xiao.k.li at gmail.com
  • Date: Thu, 29 Jun 2006 00:09:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I have discovered a bug in both PadLeft[] and PadRight[].<br>
Bellow is the test.<br>
As the test shows, in PadRight[], Mathematica 5.2 replaced Infinity as 1 automatically, which is not supposed to happen.<br>
<br>
In[1]:=      img = Table[x*10 + y, {x, 3}, {y, 3}]

Out[1]:=   {{11, 12, 13}, {21, 22, 23}, {31, 32, 33}}

-----------------------------------------

In[2]:=     PadRight[img, {3, 3}, value, {1, 1}]

Out[2]:=   {{value, value, value}, {value, 11, 12}, {value, 21, 22}}

-----------------------------------------

In[3]:=     PadRight[img, {3, 3}, Infinity, {1, 1}]

Out[3]:=   {{1, 1, 1}, {1, 11, 12}, {1, 21, 22}}

-----------------------------------------

And as far as I know, these functions are fine while dealing with other values such as number, symbol and string.

I hope above information will be a little helpful if others come cross the case in future.

Link to the forum page for this post:
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=11463#p11463
Posted through http://www.mathematica-users.org [[postId=11463]]



  • Prev by Date: Re: Pattern Matching for Exponentials
  • Next by Date: Re: Pattern Matching for Exponentials
  • Previous by thread: Re: Change Symbol in ListPlot
  • Next by thread: Re: Bugs--Bugs Report in List Operation