Skip to content

Commit

Permalink
Fix fromstring to match fromfile behavior when parsing integers (base…
Browse files Browse the repository at this point in the history
…-10 only). Ticket numpy#650
  • Loading branch information
teoliphant committed Jan 29, 2008
1 parent 7e33f2e commit 74eec4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions numpy/add_newdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
size is determined by the size of string. If sep is not empty then the
string is interpreted in ASCII mode and converted to the desired number type
using sep as the separator between elements (extra whitespace is ignored).
ASCII integer conversions are base-10; octal and hex are not supported.
""")

Expand Down
2 changes: 1 addition & 1 deletion numpy/core/src/arraytypes.inc.src
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ static int
{
@btype@ result;

result = PyOS_strto@func@(str, endptr, 0);
result = PyOS_strto@func@(str, endptr, 10);
*ip = (@type@) result;
return 0;
}
Expand Down

0 comments on commit 74eec4e

Please sign in to comment.