exxeleron / qPython

interprocess communication between Python and kdb+
http://www.devnet.de
Apache License 2.0
152 stars 89 forks source link

metadata gets dropped during copy #8

Closed buckie closed 9 years ago

buckie commented 9 years ago

Noticed that the metadata was getting dropped during a copy of the object.

q('qlst:1 2 3 4 5')
test = q('qlst') # QList([1, 2, 3, 4, 5])
print test.meta # metadata(adjust_dtype=False, qtype=-7)
test2 = numpy.copy(test)
print test2 # QList([1, 2, 3, 4, 5])
print test2.meta
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-287-74313d31bde4> in <module>()
      2 print test2
      3 print test.meta
----> 4 print test2.meta

AttributeError: 'QList' object has no attribute 'meta'
test2 = test.__copy__()
print test2 # QList([1, 2, 3, 4, 5])
print test2.meta
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-287-74313d31bde4> in <module>()
      2 print test2
      3 print test.meta
----> 4 print test2.meta

AttributeError: 'QList' object has no attribute 'meta'

Same thing happens with QTable's