A man is undergoing surgery after being shot twice by police in Melbourne.

Two officers opened fire on the 26-year-old man when he pointed a gun at them after they chased him through back blocks and over fences in Dandenong on Wednesday afternoon.

The man, who is known to police, suffered two gunshot wounds to the torso and was taken to Dandenong Hospital where he is undergoing surgery.

Assistant Commissioner Robert Hill said the officers had done an "exceptional job facing some challenging and trying circumstances".

"As far as I'm concerned they acted with the utmost professionalism. I am quite proud of what they've done," he told reporters in Dandenong on Wednesday night.

That shooting was the second time police opened fire on Wednesday, earlier exchanging gunfire with a woman during an early morning drug raid in nearby Keysborough.

No one was physically injured and drugs were seized from the property.

A man, 39, and a woman, 33, both from Keysborough, were arrested and are being interviewed.

Officers involved in both incidents were based at Dandenong police station, Mr Hill said.

Neither incident was linked to bikie gangs or Apex.