Bertrand Russell, for example, held this reading of Hume, and passed it on to the logical positivists, as A. J. Ayer explains in the video clip below.
However, recent Hume scholars have disputed this view:
“More recent scholarship refutes this earlier ‘standard’ reconstruction of Hume. … What Hume denied was that there was any empirical evidence for necessity. His so-called skepticism concerned our finding out that physical laws are nomological. But his skepticism about our ability to find evidence did not carry over to a skepticism about the existence of such necessity. He had a belief in such necessity; his problem was to justify that belief rationally and he found it difficult to do so.” (Swartz 1995: 82).Amongst these recent scholars are Wright (1983) and Strawson (1989). There is also a good summary of the new reading of Hume here.
Whether Hume really ascribed to this view or not, it does have a certain merit in carefully distinguishing the (1) ontological from (2) epistemological necessity of laws of nature.
We cannot prove by deductive argument that the laws of nature have a physical necessity. We can, however, propose inductive arguments and use inference to the best explanation to infer that it is probable that certain fundamental regularities as described in physics have a physical/natural necessity in our universe.
But the epistemological issue is that inductive argument does not yield certainty, and, paradoxically, the idea that laws of nature have physical necessity remains an empirical hypothesis/theory that is fallible in that it could be wrong, though we would need empirical evidence to prove this too.
Strawson, Galen. 1989. The Secret Connexion: Causation, Realism, and David Hume. Clarendon Press, Oxford.
Swartz, Norman. 1995. “The Neo-Humean Perspective: Laws as Regularities,” in Friedel Weinert (ed.), Laws of Nature: Essays on the Philosophical, Scientific and Historical Dimensions. Walter De Gruyter, Berlin. 67–91.
Wright, John P. 1983. The Sceptical Realism of David Hume.Manchester University Press, Manchester.