I aware that to multiple arrays, dimensions should match as:
A: array of (x,y) , B: array of (y,z)
In Python
below is working fine:
X = np.array([
[0,0,1],
[0,1,1],
[1,0,1],
[1,1,1]
])
syn0 = 2*np.random.random((3,1)) - 1
z = np.dot(X,syn0)
I tried to replicate it in Julia
as:
# input dataset
X = [ [0,0,1],
[0,1,1],
[1,0,1],
[1,1,1]
]
syn0 = 2 * rand(3,1)
z = X * syn0
But I got the below error:
DimensionMismatch("matrix A has dimensions (4,1), matrix B has dimensions (3,1)")