My teacher told me I was being obdurate. Was that a compliment?

Probably not. Obdurate means stubborn or hard-headed. So, your teacher was probably suggesting you develop some flexibility in your approach to an assignment or a problem.

Obdurate is an adjective that also has forms as a noun (obdurateness) and an adverb (obdurately). If you're not too obdurate to do a little research, you can find mentions of the word in works of literature.

From Charles Dickens's Great Expectations:

And seeing that Mr. Jaggers stood quite still and silent, and apparently quite obdurate . . .

And the same author's Oliver Twist:

'You will not persist in saying that,' rejoined the gentleman, with a voice and emphasis of kindness that might have touched a much harder and more obdurate heart. 'Think now. Tell me.'

The word weaves well into Narrative of the Life Frederick Douglass: An American Slave:

He was cruel enough to inflict the severest punishment, artful enough to descend to the lowest trickery, and obdurate enough to be insensible to the voice of a reproving conscience.

Dickens uses the adverb form of obdurate in Hard Times:

'After all your love!' he returned, obdurately.