Skip to content

Commit

Permalink
Adjusting Table and co. to Vector changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Aug 29, 2022
1 parent 21861a3 commit cf6a72a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ check_integrity entity1 entity2 =
as-is, otherwise it is wrapped in a singleton vector.
unify_vector_singleton : (Any | Vector.Vector Any) -> Vector.Vector Any
unify_vector_singleton x = case x of
Vector.Vector _ -> x
Vector.Vector -> x
_ -> [x]

## UNSTABLE
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Image/0.0.0-dev/src/Codecs.enso
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ read location flags=[] =
File.File -> location.path
_ -> location
read_flags = case flags of
Vector.Vector _ ->
Vector.Vector ->
if flags.is_empty then Java_Codecs.READ_FLAG_EMPTY else
flags.map .to_integer . reduce (_.bit_or _)
_ -> flags.to_integer
Expand Down Expand Up @@ -65,7 +65,7 @@ Image.Image.write self location flags=[] =
File.File -> location.path
_ -> location
write_flags = case flags of
Vector.Vector _ -> flags
Vector.Vector -> flags
_ -> [flags]
int_flags = Internal.mat_of_int (write_flags.flat_map x-> [x.to_integer, x.value])
Panic.catch_java Any (Java_Codecs.write path self.opencv_mat int_flags) _->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ core_op : Mat -> Any -> (Mat -> Scalar -> Mat -> Nothing) -> Nothing
core_op mat value function =
result = Mat.new
scalar = case value of
Vector.Vector _ ->
Vector.Vector ->
Scalar.new value.to_array
Matrix.Matrix m ->
if ((m.rows == mat.rows) && (m.cols == mat.cols) && (m.channels == mat.channels)) then m else Panic.throw Matrix.Dimensions_Not_Equal
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ new : Vector (Vector | Column) -> Table
new columns =
cols = columns.map c->
case c of
Vector.Vector _ -> Column.from_vector (c.at 0) (c.at 1) . java_column
Vector.Vector -> Column.from_vector (c.at 0) (c.at 1) . java_column
Column.Column java_col -> java_col
from_columns cols

Expand Down Expand Up @@ -792,7 +792,7 @@ type Table
table.set "total_stock" double_inventory
set : Text -> Column.Column | Vector.Vector -> Table
set self name column = case column of
Vector.Vector _ ->
Vector.Vector ->
self.set name (Column.from_vector name column)
Column.Column _ ->
Table (self.java_table.addOrReplaceColumn (column.rename name . java_column))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type Vector_Builder
case other of
Leaf _ -> Append self other len
Append _ _ _ -> Append self other len
Vector.Vector _ -> Append self (Leaf other) len
Vector.Vector -> Append self (Leaf other) len

## PRIVATE

Expand Down

0 comments on commit cf6a72a

Please sign in to comment.