Just a guess: perhaps your elements not not really numbers, but strings?
]x=. <@":"0 ?.4 3$0
┌──────────┬─────────┬────────┐
│0.038363 │0.329284 │0.335644│
├──────────┼─────────┼────────┤
│0.985972 │0.0583756│0.282326│
├──────────┼─────────┼────────┤
│0.69186 │0.72943 │0.770554│
├──────────┼─────────┼────────┤
│0.00127296│0.41691 │0.187512│
└──────────┴─────────┴────────┘
]c=. >1 {"1 x
0.329284
0.0583756
0.72943
0.41691
$ c
4 9
In that case, the solution would be to parse the numbers:
".@> 1 {"1 x
0.329284 0.0583756 0.72943 0.41691
-E
On Sun, 3 Oct 2021, John Dell'Aquila wrote:
Hi all,
I just discovered J a few months ago and have decided to take it up seriously.
I wish I'd found it 20 years ago. You folks keep a seriously low profile on the
internet :-)
I've worked through all of Pri, JfC and LJ to the point where I can read
modestly complex J sentences and use NuVoc. Now I'm trying do some actual work.
It's a slog gaining fluency but I can see that it will be worthwhile.
I queried a few days worth of security weights and returns using ODBC. When I
unbox the weights I get a 4x1 column vector:
data
+-------------------+----------+---------+
|2021-09-27 00:00:00|0.00346414|0.004956 |
+-------------------+----------+---------+
|2021-09-28 00:00:00|0.00381956|_0.017077|
+-------------------+----------+---------+
|2021-09-29 00:00:00|0.00378703|_0.011965|
+-------------------+----------+---------+
|2021-09-30 00:00:00|0.0037419 |_0.002666|
+-------------------+----------+---------+
1 {"1 data
+----------+----------+----------+---------+
|0.00346414|0.00381956|0.00378703|0.0037419|
+----------+----------+----------+---------+
1 {"1 data
0.00346414
0.00381956
0.00378703
0.0037419
I did the same with some random floats and I get a list as I expected:
1 {"1 <"0 ?. 4 3$0
0.32928382 0.058375569 0.72942991 0.41690965
Can someone explain what I'm missing here?
Thanks,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm