My comment was more about the parent comment's poor comparison between SF and Tokyo by using Tokyo Metropolis (Tokyo-to) population density – which includes large areas of rural land and mountains – instead of the 23 Wards which is still not perfect but a better approximation of the "city" part of Tokyo Metropolis.
I agree that the link's comparison of Tokyo 23 Wards with all of NYC is not an appropriate comparison. But not necessarily because of single-family housing as you describe. Even for Nakano Ward (with population density nearing Manhattan's), 20.8% of residential buildings are detatched single-family homes and 48.9% of residential buildings are less than 3 stories tall [0], surely a higher proportion than several NYC boroughs. Its high density is more due to having fewer areas with offices, narrower streets (compared to NYC), and barely any green space.
>Nakano ward’s density of 21,956/km2, does rank a little closer to Manhattan (around 28,000/km2).
NYC is quite large. Huge areas of the Bronx, Brooklyn, Queens, and Staten Island have low-risers or single family homes.
Which if course brings the average down.