Skip to content

Commit

Permalink
updated use of mul_elemwise
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Jun 27, 2018
1 parent 80c03f4 commit e7ca5dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
sudo: false # Use container-based infrastructure
language: python
env:
global:
- KERAS_BACKEND=tensorflow
- CUDA_VISIBLE_DEVICES=""
matrix:
include:
# Wish I could use Python 3.5 but cvxpy fails to install due to the
# multiprocess package. No idea why!
- python: 2.7
env: KERAS_BACKEND=tensorflow
- python: 3.6
env: KERAS_BACKEND=tensorflow
before_install:
# Commands below copied from: http://conda.pydata.org/docs/travis.html
# We do this conditionally because it saves us some downloading if the
Expand Down
4 changes: 2 additions & 2 deletions fancyimpute/nuclear_norm_minimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def _constraints(self, X, missing_mask, S, error_tolerance):
Representation of solution variable
"""
ok_mask = ~missing_mask
masked_X = cvxpy.mul_elemwise(ok_mask, X)
masked_S = cvxpy.mul_elemwise(ok_mask, S)
masked_X = cvxpy.multiply(ok_mask, X)
masked_S = cvxpy.multiply(ok_mask, S)
abs_diff = cvxpy.abs(masked_S - masked_X)
close_to_data = abs_diff <= error_tolerance
constraints = [close_to_data]
Expand Down

0 comments on commit e7ca5dd

Please sign in to comment.