I checked on numpy master and both examples now error instead of giving nonsense. Obviously, it would still be nicer if they returned the right thing, but at least this issue is solved, so I'll close it.