You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _array2string function in :/numpy/core/arrayprint.py introduces this comma. Right now it always adds it, but it should only do so when called from array_repr
You'll need to come up with some way to tell it to only do this in repr, not in str.
Activity
avirlrma commentedon Oct 2, 2017
@eric-wieser I would like to work on this.
avirlrma commentedon Oct 3, 2017
@eric-wieser Can you point me in the direction?
eric-wieser commentedon Oct 3, 2017
@aviral1701: Sure
The
_array2stringfunction in:/numpy/core/arrayprint.pyintroduces this comma. Right now it always adds it, but it should only do so when called fromarray_reprYou'll need to come up with some way to tell it to only do this in
repr, not instr.eric-wieser commentedon Oct 3, 2017
Actually, just changing
summary_insert = "..., "tosummary_insert = "..." + separatorshould be enough.(or better, adding the separator inside
_formatArray)You'll need to add a test too, which you can run with
runtests.pynafest commentedon Oct 3, 2017
@eric-wieser: There are already tests that cover this change. Is it necessary to add an additional test?
avirlrma commentedon Oct 3, 2017
@nafest I was supposed to be doing this as already mentioned above.Why did you commit then?
nafest commentedon Oct 3, 2017
@aviral1701 sorry I fixed that yesterday. Didn't know I had to comment that I am working on this.
avirlrma commentedon Oct 3, 2017
@eric-wieser I would suggest that we add some guidelines in Contributing guide to avoid duplicacy of work which harm the contribution spirit.
BUG: fix stray comma in _array2string
BUG: fix stray comma in _array2string