Removed unsafe_view from sample and ultraspherical