<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toarray(self):
 """ Converts a ktensor into a dense multidimensional ndarray Returns ------- arr : np.ndarray Fully computed multidimensional array whose shape matches the original ktensor. """

        A = dot(self.lmbda, khatrirao(tuple(self.U)).T)
        return A.reshape(self.shape)