def calculate_gradient(self, X, Y, W):

        if type(Y) is np.ndarray:
            data_num = len(Y)
        else:
            data_num = 1

        gradient_average = data_num/np.dot(self.theta((-1)*Y*np.dot(W, X.transpose()))*((-1)*Y), X)

        return gradient_average
dataset/ETHPy150Open fukuball/fuku-ml/FukuML/LogisticRegression.py/LogisticRegression.calculate_gradient/swapped operands of `/`