For some design reason, the shape of all cells in data are rank-1 even if
the content is just a number. You can fact check with  $&.> data
unbox a vector of rank-1 singleton will give a rank-2 column vector.
try this > (,1);(,2);(,3)

On Mon, Oct 4, 2021 at 12:18 PM John Dell'Aquila <[email protected]> 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

Reply via email to