public function dot($factor)
{
if (!$factor instanceof NumArray) {
$factor = new NumArray($factor);
}
$result = Dot::dotArray($this->data, $this->shape, $factor->getData(), $factor->getShape());
$this->data = $result['data'];
$this->shape = $result['shape'];
$this->flushCache();
return $this;
}