Modified Fix for issue #81: taking ws as numpy arrays