Skip to content

Tag: arrays

Difference of Numpy Dimension Expand code

I got confuse between two Numpy dimension expand code. First code is X[:, np.newaxis]. Second code is X[:, np.newaxis, :]. I ran this code on Jupyter, But it returns same shape and result. What is the difference? Answer Refer numpy documentation for newaxis. https://numpy.org/doc/stable/reference/constants.ht…

Print array value without brackets in Python

So, I have an array value like this with print(Items) it’s returning [‘*.abc.com’, ‘*.xyz.me’] but, I want to print everything without brackets like ‘*.abc.com’, ‘*.xyz.me’ Followed some way, but those are returning different not exactly what I want. Answe…