Skip to content

Commit

Permalink
Simplify B.cast for TF
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Jun 4, 2018
1 parent 48ddf32 commit 073d6dd
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lab/proxies/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,11 @@ def dtype(a):
return a.dtype


@_dispatch(_Numeric, object)
@_dispatch(_Numeric, [object])
def cast(a, dtype):
return tf.cast(a, dtype)


@_dispatch(object)
def cast(a, dtype):
# This is a call with a keyword argument.
return cast(a, dtype)


@_dispatch(object)
def shape(a):
return np.shape(a)
Expand Down

0 comments on commit 073d6dd

Please sign in to comment.