Group Abstract Group Abstract

Message Boards Message Boards

4
|
1.8K Views
|
4 Replies
|
11 Total Likes
View groups...
Share
Share this post:

Spatial data in Tabular

POSTED BY: Gareth Russell
4 Replies

Interesting: thanks for that, Can I ask why? Is there some overhead to using the efficient data structures that makes Tabular slower for small datasets? And roughly where is the cutoff of "small"?

POSTED BY: Gareth Russell

Tabular stores data in highly efficient ways, and sometimes it needs to change the data for homogeneous storage. Then we want to preserve the original input for normalization. For example, columns of quantities store all magnitudes in the same unit. Compare these two cases:

In[]:= Normal@ ToTabular[{{Quantity[1, "Kilometers"]}, {Quantity[1, "Meters"]}}]
Out[]= {{Quantity[1, "Kilometers"]}, {Quantity[1, "Meters"]}}

In[]:= Normal@ ToTabular[{{Quantity[1, "Kilometers"]}, {Quantity[1, "Meters"]}}, Automatic, <|"CacheOriginalExpression" -> False|>]
Out[]= {{Quantity[1000, "Meters"]}, {Quantity[1, "Meters"]}}

In the first case we cached the data, and therefore Normal recovered the original expression, even though internally it was changed to meters. In the second case we didn't cache, and therefore Normal recovered an equivalent expression, but not the same one.

I may have misspoken about doing this only for small cases. I will check with my colleagues to see if we currently always do this when Tabular believes Normal may return an output that is equivalent but not identical.

POSTED BY: Gareth Russell
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard