Use clip method to cut negative values to avoid the overhead of creating a new matrix of booleans (mask)

Signed-off-by: German Kruszewski <german.kruszewski@unitn.it>