srush / annotated-s4

Implementation of https://srush.github.io/annotated-s4

Home Page:https://srush.github.io/annotated-s4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question, why does the reshape function has no argument?

JonathanSum opened this issue · comments

Hi. I see the reshape function does not take arguments.
image
I guess this is not an error. If so, can someone explain to me what shape it is going to have from the original shape?

It just turns it into a jax scalar

import jax.numpy as np
np.array([1]).reshape().shape

()

This function could be written in a much more efficient way, just wanted to show it in a non-matrix style.

Thx for answering. But It is just "reshape()" in the code, not "reshape().shape"

I was just showing that the shape is () after reshape, i.e. scalar