400 gallons for a shark and 200 for a ray is on the extreme side, but safe side. You can however house a bamboo in a 200 for a few years but always remember the bigger tank the better,, i beleive thats for any fish,, not only sharks and rays..
But the one thing that you absolutly cannot do is house a shark in a 100 gallons...thats very bad