Advertisement
Guest User

nrook

a guest
Jun 5th, 2009
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. >>> import numpy
  2. >>> print numpy.version.version
  3. 1.3.0
  4. >>> s = numpy.string_('ab\x00')
  5. >>> print repr(s) # display bug, which I think is ticket 659
  6. 'ab'
  7. >>> s == 'ab\x00'
  8. True
  9. >>> s == 'ab' # but the string is stored correctly
  10. False
  11. >>> print repr(str(s)) # this, however, is wrong
  12. 'ab'
  13. >>> str(s) == s # and leads to this
  14. False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement