Machine Learning in Elixir: Nx error in code on page 16

@seanmor5

When running the code on page 16 to create the one hot encoded tensors, I get an Nx error I am not able to make sense of:

** (ArgumentError) invalid numerical type: :none (see Nx.Type docs for all supported types)
    (nx 0.6.2) lib/nx/type.ex:178: Nx.Type.normalize!/1
    (nx 0.6.2) lib/nx.ex:896: Nx.template/3
    (explorer 0.7.1) lib/explorer/tensor_frame.ex:241: Nx.LazyContainer.Explorer.Series.traverse/3
    (nx 0.6.2) lib/nx.ex:14626: Nx.flatten_container/2
    (nx 0.6.2) lib/nx.ex:14613: Nx.flatten_list_or_container/1
    (nx 0.6.2) lib/nx.ex:14727: Nx.stack/2
    (stdlib 5.0.2) erl_eval.erl:746: :erl_eval.do_apply/7
    (stdlib 5.0.2) erl_eval.erl:1026: :erl_eval.expr_list/7

The source code in the zip file works, but is quite a bit different in how it does the one hot encoding.