added some backward compatibility to older numpy