The “half/whole diminished scale” works over a dominant seventh with a flat nine and/or sharp nine chord. This is why some people call it the “dominant diminished scale”.
How do you use a dominant diminished scale?
Dominant Diminished Scale Pattern
To begin, here is the pattern applied to a D Dominant Diminished Scale. Notice that the pattern is four notes long (Eb-D-Eb-F to begin), then it is repeated starting on F#, then A and so on as you run up this two-octave scale shape.
What scale goes with diminished chords?
The best way to approach this is probably to take a look at the scale that is the key. In this case that is F major as shown in example 2. If we alter this scale to contain a Dim chord then we get either an A harmonic minor scale or you could also choose a C harmonic major scale.