SHARE
TWEET

nrook

a guest Jun 5th, 2009 112 Never
  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
RAW Paste Data
Top