# Creating a 1d "grid" (possible fluid.grid~ bug?)

**URL:** <https://discourse.flucoma.org/t/creating-a-1d-grid-possible-fluid-grid-bug/1939>\
**Category:** Usage Questions\
**Created:** [June 12, 2023, 12:47pm UTC](https://discourse.flucoma.org/t/creating-a-1d-grid-possible-fluid-grid-bug/1939 "2023-06-12T12:47:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [June 12, 2023, 12:47pm UTC](https://discourse.flucoma.org/t/creating-a-1d-grid-possible-fluid-grid-bug/1939/1 "2023-06-12T12:47:36Z")

</div>

I’m trying to build something where I plot all the samples in a corpus along a single 1d line (0. to 1.).

I can do this easily enough with umap and normalize, but I would also like the points to be evenly spaced on that line. So I thought to use `fluid.grid~`, but it seems that `@extent` doesn’t let you go down to `1’ (the helpfile says that zero turns off constraints but nothing about 1 being impossible).

At the moment if you set `@extent 1` on `fluid.grid~` it silently fails by creating an empty dataset. The helpfile throws an error, but that’s only from the `fluid.normalize~` further down the pipe. By poking/printing it’s possible to see that the dataset generated is empty.

 ![Screenshot 2023-06-12 at 1.45.57 PM](https://discourse.flucoma.org/uploads/default/original/2X/2/21a2d3b142c537bc660a3f5dc6bb804a0fea99c6.png)

`@extent 1`:

```auto
fluid.normalize~: DataSet is empty
fluid.dataset~: DataSet help.grid.3.output: {}

```

`@extent 2`:

```auto
fluid.dataset~: DataSet help.grid.3.output: 
rows: 100 cols: 2
0 1 3
1 1 21
10 1 42
       ...
97 0 45
98 0 11
99 1 43

```

I suppose I could do umap-\>normalize then manually create a new spacing by taking `1 / amount_of_entries` and accum-ing that for each step but that feels faffy to have to go in/out of stuff.

Is the behavior of `fluid.grid~` expected here (`@extent 1` being impossible and silently failing) or is that an oversight bug?

---

<div class="post-metadata">

**Author:** ![rodrigo.constanzo](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/rodrigo.constanzo/32/12_2.png) [@rodrigo.constanzo](https://discourse.flucoma.org/u/rodrigo.constanzo)\
**Post date:** [June 12, 2023, 3:45pm UTC](https://discourse.flucoma.org/t/creating-a-1d-grid-possible-fluid-grid-bug/1939/2 "2023-06-12T15:45:57Z")

</div>

> [@rodrigo.constanzo](#):
>
> I suppose I could do umap-\>normalize then manually create a new spacing by taking `1 / amount_of_entries` and accum-ing that for each step but that feels faffy to have to go in/out of stuff.

In the end this wasn’t so bad to do, so I’ve gone and done this but leaving the thread up/open in case there is a weird or unexpected behavior with `fluid.grid~`.

---

<div class="post-metadata">

**Author:** ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)\
**Post date:** [June 13, 2023, 5:32pm UTC](https://discourse.flucoma.org/t/creating-a-1d-grid-possible-fluid-grid-bug/1939/3 "2023-06-13T17:32:30Z")

</div>

I think that by virtue of the algorithm being an assignment, you need to have two dimensions. Not 100% sure though as I didn’t implement it, nor am I that knowledgeable. But I would hedge its not a bug. It is also entirely pointless outside of patching convenience to assign in one dimension, as you can just quantise the range of your data across one axis.
