These were defunct asylums of New England, as the article clearly states.The supposed elctric shock machine in actually an autoclave, for sterilizing instruments, by the way.
I don't know if the current method of dealing with the mentally ill.. that of turning them loose into homelessness and raving on the streets is any more humane than these images indicate.