Combining feature matrixes of different shapes into a single feature
A library that I am using only supports 1 feature matrix as an input.

Therefore, I would like to merge my two features into a single feature.


Feature #1: a simple float e.g. tensor([1.9])
Feature #2: categorical that I would like to one-hot encode tensor([0., 1., 0])


tensor([
    [1.9, 0., 0.],     # row 1 for float
    [0., 1., 0.]       # row 2 for OHE
])


My plan would be to take the 1x1 feature and the 3x1 feature merge them into a 3x2. 

For the float row, I would always have the 2nd and 3rd entries zeroed out. &lt;-- is there a better approach? e.g. should i use three 1.9's?

Would this method give the affect of training on both features simultaneously?

Yes, what you propose would work, in that the model would just learn to ignore the second and third indices. But since those are never used, you can just concatenate them directly, i.e.

tensor([1.9, 0., 1., 0.])


you don't need to "indicate" in any way to the model that the first value is a scalar and the rest operate as a one-hot encoding. The model will figure out the relevant features for the task you care about.
