Cor nearest maint

Change bare asserts to numpy asserts.