catkira / py3gpp

A Python package for 5G-NR simulations
GNU Affero General Public License v3.0
97 stars 17 forks source link

`nrCRCEncode` returns tricky array #60

Closed vborchsh closed 1 year ago

vborchsh commented 1 year ago

It returns numpy ndarray, which is multidimentional array. Obviously, this because of blk = np.expand_dims(blk, axis = 1) .

So, now I need:

encoded_bits = nrCRCEncode(ref_bits, crc_type).T[0]

instead of:

encoded_bits = nrCRCEncode(ref_bits, crc_type)

is there a reason to keep it like this?

catkira commented 1 year ago

I think it is like that because nrCRCEncode can process multiply blocks at once in matlab. So the extra axis is kept to have the same return interface if one or more blocks are given as input.

vborchsh commented 1 year ago

Ah, ok, I see