Fix resolution order for ndarray activation variants; Add specific tests for ndarrays (issue #129)