Fixed array shape bug in test_connection:test_weights.