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.