Closed ghlian closed 5 years ago
t[12]~np[:arange][*][12.]
t[12]~np[:arange;*][12.]
t[12]~np[:arange][*;12.]
t[12]~np[:arange;*;12.]
t[12]~np[:arange][12.]
t[12]~np[:arange;12.]
used the test cases. the symbol is not shown in this post above t[12]~np[:arange][*][12.]
get 0b
Hi,
Could you please provide the code for what t is?
If t[12] is equivalent to the q function q)til 12 then the following should rectify the problem:
q)t:{til x}
q)t[12]~(np[:arange;*][12]
)
1b
Thanks, Diane
the codes are simply the testcases in embedPy/tests/syntax.t
All return 0b. q)t[12] is working fine.
however, in numpy 1.14.3 and q version 3.5 64bit, all the testcases return 1b.
Hi, I think there are were some issues with backticks "`" disappearing in the markdown.
I haven't been able to replicate this so far using the latest version of embedPy and kdb+ 3.6 on any of linux, macOS or windows.
Can you let us a few more details so we can try and replicate your issue.
Below is what I get by building from the latest version of the source (on linux in this case)
$ conda list numpy && conda list python
# packages in environment at /home/james/anaconda3/envs/py37:
#
# Name Version Build Channel
numpy 1.15.2 py37h1d66e8a_1
numpy-base 1.15.2 py37h81de0dd_1
# packages in environment at /home/james/anaconda3/envs/py37:
#
# Name Version Build Channel
python 3.7.0 hc3d631a_0
$ q p.q
KDB+ 3.6 2018.06.01 Copyright (C) 1993-2018 Kx Systems
l64/ 8()core 64303MB ...
q)np:.p.import`numpy
q)t:"f"$til@
q)t[12]~np[`:arange][*][12.]`
1b
q)t[12]~np[`:arange;*][12.]`
1b
q)t[12]~np[`:arange][*;12.]`
1b
q)t[12]~np[`:arange;*;12.]`
1b
q)t[12]~np[`:arange][12.]`
1b
q)t[12]~np[`:arange;12.]`
1b
q)t[12]~np[`:arange][<]12.
1b
q)t[12]~np[`:arange;<]12.
1b
q)t[12]~np[`:arange][<;12.]
1b
q)t[12]~np[`:arange;<;12.]
1b
q)
Closing this issue. We have been able to replicate the issue with the provided info. Feel free to reopen with details so that we can replicate the issue.
in python 3.7 and numpy 1.15.2, q version 3.6 64bit the numpy array cannot be converted to q data.
all the testcases return 0
t[12]~np[
:arange][*][12.]
t[12]~np[:arange;*][12.]
t[12]~np[:arange][*;12.]
t[12]~np[:arange;*;12.]
t[12]~np[:arange][12.]
t[12]~np[:arange;12.]
t[12]~np[
:arange][<]12. t[12]~np[
:arange;<]12. t[12]~np[:arange][<;12.] t[12]~np[
:arange;<;12.]t[12]~.p.py2q np[
:arange][>]12. t[12]~.p.py2q np[
:arange;>]12. t[12]~.p.py2q np[:arange][>;12.] t[12]~.p.py2q np[
:arange;>;12.]