Want more features on Pastebin? Sign Up, it's FREE!
Guest

nrook

By: a guest on Jun 5th, 2009  |  syntax: Python  |  size: 0.33 KB  |  views: 111  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data