Skip to content

Commit

Permalink
Use shape in fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
versilov committed Mar 12, 2019
1 parent bb28701 commit 45e0786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matrex.ex
Expand Up @@ -528,7 +528,7 @@ defmodule Matrex do
def fetch(%Matrex{shape: {rows, _}}, :rows), do: {:ok, rows}
def fetch(%Matrex{shape: {_, cols}}, :cols), do: {:ok, cols}
def fetch(%Matrex{shape: {_, cols}}, :columns), do: {:ok, cols}
def fetch(%Matrex{shape: {rows, cols}}, :size), do: {:ok, {rows, cols}}
def fetch(%Matrex{shape: shape}, :size), do: {:ok, shape}
def fetch(matrex, :sum), do: {:ok, sum(matrex)}
def fetch(matrex, :max), do: {:ok, max(matrex)}
def fetch(matrex, :min), do: {:ok, min(matrex)}
Expand Down

0 comments on commit 45e0786

Please sign in to comment.